本文整理汇总了Java中org.eclipse.gef.Disposable类的典型用法代码示例。如果您正苦于以下问题:Java Disposable类的具体用法?Java Disposable怎么用?Java Disposable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Disposable类属于org.eclipse.gef包,在下文中一共展示了Disposable类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: dispose
import org.eclipse.gef.Disposable; //导入依赖的package包/类
/**
* Calls dispose on all actions which implement the {@link Disposable}
* interface so they can perform their own clean-up.
*/
public void dispose() {
Iterator actions = getActions();
while (actions.hasNext()) {
IAction action = (IAction) actions.next();
if (action instanceof Disposable)
((Disposable) action).dispose();
}
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:13,代码来源:ActionRegistry.java
示例2: dispose
import org.eclipse.gef.Disposable; //导入依赖的package包/类
@Override
public void dispose()
{
InstallOptionsModel.INSTANCE.removeModelListener(mModelListener);
mJobScheduler.cancelJobs(mJobFamily);
IInstallOptionsEditorInput input = (IInstallOptionsEditorInput)getEditorInput();
Object source = input.getSource();
if(source instanceof IFile) {
IFile file = (IFile)source;
file.getWorkspace().removeResourceChangeListener(mResourceListener);
}
mMarkerPositions.clear();
IDocument document = getDocumentProvider().getDocument(input);
document.removePositionUpdater(mMarkerPositionUpdater);
if(document.containsPositionCategory(MARKER_CATEGORY)) {
try {
document.removePositionCategory(MARKER_CATEGORY);
}
catch (BadPositionCategoryException e) {
InstallOptionsPlugin.getDefault().log(e);
}
}
mINIFile.disconnect(document);
mINIFile.removeListener(this);
((ProjectionViewer)getSourceViewer()).removeProjectionListener(this);
((TextViewer)getSourceViewer()).removePostSelectionChangedListener(mSelectionSynchronizer);
getSourceViewer().getSelectionProvider().removeSelectionChangedListener(mSelectionSynchronizer);
IAction action = super.getAction(PreviewAction.PREVIEW_CLASSIC_ID);
if(action instanceof Disposable) {
((Disposable)action).dispose();
}
action = super.getAction(PreviewAction.PREVIEW_MUI_ID);
if(action instanceof Disposable) {
((Disposable)action).dispose();
}
super.dispose();
}
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:38,代码来源:InstallOptionsSourceEditor.java
示例3: disposePalette
import org.eclipse.gef.Disposable; //导入依赖的package包/类
private void disposePalette() {
if (getEditDomain().getPaletteViewer() != null) {
if (getPaletteViewerProvider() instanceof UrnPaletteViewerProvider) {
UrnPaletteViewerProvider p = (UrnPaletteViewerProvider) getPaletteViewerProvider();
p.unconfigurePaletteViewer(getEditDomain().getPaletteViewer());
}
getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this);
getEditDomain().getPaletteViewer().getEditPartRegistry().clear();
getEditDomain().getPaletteViewer().setKeyHandler(null);
getEditDomain().getPaletteViewer().setControl(null);
getEditDomain().getPaletteViewer().setPaletteRoot(null);
// getEditDomain().setPaletteViewer(new PaletteViewer());
}
getGraphicalViewer().setKeyHandler(null);
getEditorSite().setSelectionProvider(null);
if (paletteRoot instanceof Disposable) {
((Disposable) paletteRoot).dispose();
}
paletteRoot = null;
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:28,代码来源:UrnEditor.java
注:本文中的org.eclipse.gef.Disposable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论