本文整理汇总了Java中org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette类的典型用法代码示例。如果您正苦于以下问题:Java GraphicalEditorWithFlyoutPalette类的具体用法?Java GraphicalEditorWithFlyoutPalette怎么用?Java GraphicalEditorWithFlyoutPalette使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphicalEditorWithFlyoutPalette类属于org.eclipse.gef.ui.parts包,在下文中一共展示了GraphicalEditorWithFlyoutPalette类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; //导入依赖的package包/类
@Override
public void run() {
if (part instanceof GraphicalEditorWithFlyoutPalette) {
GraphicalEditorWithFlyoutPalette edPart = (GraphicalEditorWithFlyoutPalette) part;
ImageSaveUtil.save(edPart, getViewer(edPart));
}
}
示例2: getViewer
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; //导入依赖的package包/类
private GraphicalViewer getViewer(GraphicalEditorWithFlyoutPalette edPart) {
if (edPart instanceof InitAssemblyEditor) {
return ((InitAssemblyEditor) edPart).getViewer();
} else if (edPart instanceof IntFinalAssemblyEditor) {
return ((IntFinalAssemblyEditor) edPart).getViewer();
} else if (edPart instanceof IntLogicalSysEditor) {
return ((IntLogicalSysEditor) edPart).getViewer();
} else if (edPart instanceof IntDeploymentEditor) {
return ((IntDeploymentEditor) edPart).getViewer();
} else if (edPart instanceof CompImplEditor) {
return ((CompImplEditor) edPart).getViewer();
}
return null;
}
示例3: run
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; //导入依赖的package包/类
@Override
public void run() {
if (part instanceof GraphicalEditorWithFlyoutPalette) {
GraphicalEditorWithFlyoutPalette edPart = (GraphicalEditorWithFlyoutPalette) part;
ExportCommand cmd = new ExportCommand(containerName, getFileName(edPart), getFileType(edPart), getContent(edPart));
execute(cmd);
}
}
示例4: getContent
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; //导入依赖的package包/类
private String getContent(GraphicalEditorWithFlyoutPalette edPart) {
try {
FileEditorInput inp = (FileEditorInput) edPart.getEditorInput();
String path = inp.getFile().getLocation().toOSString();
String text = FileUtils.readFileToString(new File(path));
return text;
} catch (Exception e) {
EclipseUtil.writeStactTraceToConsole(e);
}
return null;
}
示例5: getFileType
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; //导入依赖的package包/类
private String getFileType(GraphicalEditorWithFlyoutPalette edPart) {
if (edPart instanceof InitAssemblyEditor) {
return "assmbl";
} else if (edPart instanceof IntFinalAssemblyEditor) {
return "fassmbl";
} else if (edPart instanceof IntLogicalSysEditor) {
return "lsys";
} else if (edPart instanceof IntDeploymentEditor) {
return "deploy";
} else if (edPart instanceof CompImplEditor) {
return "cimpl";
}
return null;
}
示例6: getFileName
import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; //导入依赖的package包/类
private String getFileName(GraphicalEditorWithFlyoutPalette edPart) {
FileEditorInput inp = (FileEditorInput) edPart.getEditorInput();
return inp.getFile().getLocation().toOSString();
}