org.eclipse.ui.IWorkbenchPartConstants#org.eclipse.ui.IPropertyListener源码实例Demo

下面列出了org.eclipse.ui.IWorkbenchPartConstants#org.eclipse.ui.IPropertyListener 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: nebula   文件: PGroupStackPresentation.java
/** 
 * {@inheritDoc}
 */
@Override
public void addPart(final IPresentablePart newPart, Object cookie)
{ 
    updateItem(newPart);
    
    newPart.addPropertyListener(new IPropertyListener()
    {        
        public void propertyChanged(Object source, int propId)
        {
            updateItem(newPart);
        }        
    });
    
    resizeSelectedPart();
}
 
源代码2 项目: nebula   文件: CTabFolderStackPresentation.java
/** 
 * {@inheritDoc}
 */
@Override
public void addPart(final IPresentablePart newPart, Object cookie)
{
    ignoreSelection = true;
    final CTabItem item = new CTabItem(tabFolder,SWT.NONE);
    ignoreSelection = false;
    item.setData(DATAKEY_PART,newPart);
    
    updateItem(newPart);
    
    newPart.addPropertyListener(new IPropertyListener()
    {        
        public void propertyChanged(Object source, int propId)
        {
            updateItem(newPart);
        }        
    });
}
 
/** 
 * {@inheritDoc}
 */
@Override
public void addPart(final IPresentablePart newPart, Object cookie)
{ 
    updateItem(newPart);
    
    newPart.addPropertyListener(new IPropertyListener()
    {        
        public void propertyChanged(Object source, int propId)
        {
            updateItem(newPart);
        }        
    });
    
    resizeSelectedPart();
}
 
源代码4 项目: xtext-eclipse   文件: ConditionPage.java
@Override
protected void createTypeSpecificEditors(Composite parent) {
	try {
		IJavaBreakpoint breakpoint = getBreakpoint();
		IMarker marker = breakpoint.getMarker();
		Object sourceUri = marker.getAttribute(StratumBreakpointAdapterFactory.ORG_ECLIPSE_XTEXT_XBASE_SOURCE_URI);
		if (sourceUri != null) {
			setTitle("Condition");
			final JavaBreakpointConditionEditor editor = new JavaBreakpointConditionEditor();
			editor.createControl(parent);
			editor.addPropertyListener(new IPropertyListener() {
				@Override
				public void propertyChanged(Object source, int propId) {
					IStatus status = editor.getStatus();
					if (status.isOK()) {
						if (fPrevMessage != null) {
							removeErrorMessage(fPrevMessage);
							fPrevMessage = null;
						}
					} else {
						fPrevMessage = status.getMessage();
						addErrorMessage(fPrevMessage);
					}
				}
			});
			URI uri = URI.createURI(String.valueOf(sourceUri));
			JavaBreakPointProvider breakPointProvider = registry.getResourceServiceProvider(uri).get(JavaBreakPointProvider.class);
			editor.setInput(breakPointProvider.getBreakpointWithJavaLocation((IJavaStratumLineBreakpoint) breakpoint));
			// set this editor only if it was correctly initialized
			this.editor = editor;
		}
	} catch (CoreException e) {
		setErrorMessage(e.getMessage());
	} 
}
 
源代码5 项目: tlaplus   文件: OpenModuleHandler.java
/**
 * This was the body of the <code>execute</code>, but was pulled out so it could be
 * used in other places to open a module.
 * 
 * @param moduleName
 */
public static void openModule(String moduleName) {
    if (moduleName == null)
    {
        throw new RuntimeException("Module was null" );
    }
    Spec spec = Activator.getSpecManager().getSpecLoaded();
    final IFile module = ResourceHelper.getLinkedFile(spec.getProject(), ResourceHelper.getModuleFileName(moduleName));
    if (module == null)
    {
        throw new RuntimeException("Module " + moduleName + " could not be found" );
    }

    // open the editor
    IEditorPart part = UIHelper.openEditor(OpenSpecHandler.TLA_EDITOR, new FileEditorInput(module));
    part.addPropertyListener(new IPropertyListener() {

        public void propertyChanged(Object source, int propId)
        {
            if (IWorkbenchPartConstants.PROP_DIRTY == propId)
            {
                // here the listeners to editor changes go into
                
            } 
        }
    });

}
 
public void addPropertyListener(IPropertyListener l) {
	if (tagStyleManager != null) {
		tagStyleManager.setTagStyle(TagStyle.curStyle);
		autoResize();
		refresh();
	}
	super.addPropertyListener(l);
}
 
源代码7 项目: tmxeditor8   文件: XLIFFEditorImplWithNatTable.java
public void addPropertyListener(IPropertyListener l) {
	if (tagStyleManager != null) {
		tagStyleManager.setTagStyle(TagStyle.curStyle);
		autoResize();
		refresh();
	}
	super.addPropertyListener(l);
}
 
源代码8 项目: nebula   文件: PShelfStackPresentation.java
/** 
 * {@inheritDoc}
 */
@Override
public void addPart(final IPresentablePart newPart, Object cookie)
{
    ignoreSelection = true;
    final PShelfItem item = new PShelfItem(shelf,SWT.NONE);
    ignoreSelection = false;
    item.setData(DATAKEY_PART,newPart);
    
    item.getBody().setLayout(null);        
    item.getBody().addListener(SWT.Paint, new Listener()
    {        
        public void handleEvent(Event e)
        {
            Integer separatorY = (Integer)item.getBody().getData(DATAKEY_SEPHEIGHT);
            if (separatorY == null) return;
            e.gc.setForeground(border);
            e.gc.drawLine(0,separatorY.intValue(),item.getBody().getSize().x,separatorY.intValue());
        }        
    });
    
    CLabel descLabel = new CLabel(item.getBody(),SWT.WRAP);
    item.setData(DATAKEY_DESCLABEL,descLabel);
    
    descLabel.setBackground(toolbarBackground);
    
    ToolBar tb = new ToolBar(item.getBody(),SWT.NONE);
    item.setData(DATAKEY_MENUTOOL,tb);
    
    tb.setBackground(toolbarBackground);
    
    updateItem(newPart);
    
    newPart.addPropertyListener(new IPropertyListener()
    {        
        public void propertyChanged(Object source, int propId)
        {
            updateItem(newPart);
        }        
    });
}
 
源代码9 项目: APICloud-Studio   文件: SVNLocalCompareInput.java
public void removePropertyListener(IPropertyListener listener) {
}
 
源代码10 项目: APICloud-Studio   文件: SVNLocalBaseCompareInput.java
public void removePropertyListener(IPropertyListener listener) {
}
 
public void removePropertyListener(IPropertyListener listener) {
}
 
源代码12 项目: APICloud-Studio   文件: SVNCompareRevisionsInput.java
public void removePropertyListener(IPropertyListener listener) {
}
 
public void removePropertyListener(IPropertyListener listener) {
}
 
源代码14 项目: Pydev   文件: EditIgnoredCaughtExceptions.java
@Override
public void run() {
    IPath ignoreThrownExceptionsPath = PyExceptionBreakPointManager
            .getInstance().ignoreCaughtExceptionsWhenThrownFrom
                    .getIgnoreThrownExceptionsPath();
    File file = ignoreThrownExceptionsPath.toFile();
    IEditorPart openFile = EditorUtils.openFile(file);

    if (openFile instanceof ITextEditor) {
        final ITextEditor textEditor = (ITextEditor) openFile;
        IDocumentProvider documentProvider = textEditor.getDocumentProvider();
        final IEditorInput input = openFile.getEditorInput();
        if (documentProvider instanceof IStorageDocumentProvider) {
            IStorageDocumentProvider storageDocumentProvider = (IStorageDocumentProvider) documentProvider;

            // Make sure the file is seen as UTF-8.
            storageDocumentProvider.setEncoding(input, "utf-8");
            textEditor.doRevertToSaved();
        }
        if (textEditor instanceof ISaveablePart) {
            IPropertyListener listener = new IPropertyListener() {

                @Override
                public void propertyChanged(Object source, int propId) {
                    if (propId == IWorkbenchPartConstants.PROP_DIRTY) {
                        if (source == textEditor) {
                            if (textEditor.getEditorInput() == input) {
                                if (!textEditor.isDirty()) {
                                    PyExceptionBreakPointManager.getInstance().ignoreCaughtExceptionsWhenThrownFrom
                                            .updateIgnoreThrownExceptions();
                                }
                            }
                        }
                    }
                }
            };
            textEditor.addPropertyListener(listener);

        }
    }

    //        Code to provide a dialog to edit it (decided on opening the file instead).
    //        Collection<IgnoredExceptionInfo> ignoreThrownExceptionsForEdition = PyExceptionBreakPointManager.getInstance()
    //                .getIgnoreThrownExceptionsForEdition();
    //        HashMap<String, String> map = new HashMap<>();
    //        for (IgnoredExceptionInfo ignoredExceptionInfo : ignoreThrownExceptionsForEdition) {
    //            map.put(ignoredExceptionInfo.filename + ": " + ignoredExceptionInfo.line, ignoredExceptionInfo.contents);
    //        }
    //
    //        EditIgnoredCaughtExceptionsDialog dialog = new EditIgnoredCaughtExceptionsDialog(EditorUtils.getShell(), map);
    //        int open = dialog.open();
    //        if (open == dialog.OK) {
    //            Map<String, String> result = dialog.getResult();
    //
    //        } else {
    //            System.out.println("Cancel");
    //        }
}
 
源代码15 项目: APICloud-Studio   文件: SVNLocalCompareInput.java
public void addPropertyListener(IPropertyListener listener) {
	
}
 
源代码16 项目: APICloud-Studio   文件: SVNLocalBaseCompareInput.java
public void addPropertyListener(IPropertyListener listener) {
	
}
 
public void addPropertyListener(IPropertyListener listener) {
	
}
 
源代码18 项目: APICloud-Studio   文件: SVNCompareRevisionsInput.java
public void addPropertyListener(IPropertyListener listener) {
	
}
 
public void addPropertyListener(IPropertyListener listener) {
	
}
 
源代码20 项目: RDFS   文件: HadoopPathPage.java
public void addPropertyListener(IPropertyListener listener) {
  // TODO Auto-generated method stub

}
 
源代码21 项目: RDFS   文件: HadoopPathPage.java
public void removePropertyListener(IPropertyListener listener) {
  // TODO Auto-generated method stub

}
 
源代码22 项目: bonita-studio   文件: FakeEditorPart.java
@Override
public void addPropertyListener(IPropertyListener listener) {

}
 
源代码23 项目: bonita-studio   文件: FakeEditorPart.java
@Override
public void removePropertyListener(IPropertyListener listener) {

}
 
源代码24 项目: hadoop-gpu   文件: HadoopPathPage.java
public void addPropertyListener(IPropertyListener listener) {
  // TODO Auto-generated method stub

}
 
源代码25 项目: hadoop-gpu   文件: HadoopPathPage.java
public void removePropertyListener(IPropertyListener listener) {
  // TODO Auto-generated method stub

}