本文整理汇总了Java中org.eclipse.jface.viewers.ViewerLabel类的典型用法代码示例。如果您正苦于以下问题:Java ViewerLabel类的具体用法?Java ViewerLabel怎么用?Java ViewerLabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewerLabel类属于org.eclipse.jface.viewers包,在下文中一共展示了ViewerLabel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object firstSegment = elementPath.getFirstSegment();
if (firstSegment instanceof IProject && elementPath.getSegmentCount() == 2) {
IProject project = (IProject) firstSegment;
Object lastSegment = elementPath.getLastSegment();
if (lastSegment instanceof IFolder) {
IFolder folder = (IFolder) lastSegment;
if (!folder.getParent().equals(project)) {
// This means that a folder that is not a direct child of the project
// is a child in the tree. Therefore, the resource content provider
// must be active and in compress folder mode so we will leave
// it to the resource provider to provide the proper label.
// We need to do this because of bug 153912
return;
}
}
}
label.setImage(getImage(elementPath.getLastSegment()));
label.setText(getText(elementPath.getLastSegment()));
Font f = getFont(elementPath.getLastSegment());
if (f != null)
label.setFont(f);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:JavaSynchronizationLabelProvider.java
示例2: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof StatemachineNavigatorItem
&& !isOwnView(((StatemachineNavigatorItem) element).getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例3: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Diagram lastSegment = (Diagram) elementPath.getLastSegment();
NamedElement element = (NamedElement) lastSegment.getElement();
AdapterFactoryLabelProvider provider = new AdapterFactoryLabelProvider(
new SGraphItemProviderAdapterFactory());
label.setText(provider.getText(element));
if (element instanceof Statechart)
label.setImage(StatechartImages.LOGO.image());
else
label.setImage(provider.getImage(element));
}
示例4: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof SmcNavigatorItem
&& !isOwnView(((SmcNavigatorItem) element).getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例5: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof Wc2014NavigatorItem
&& !isOwnView(((Wc2014NavigatorItem) element).getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例6: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof SimpleBPMN.diagram.navigator.SimpleBPMNNavigatorItem
&& !isOwnView(((SimpleBPMN.diagram.navigator.SimpleBPMNNavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例7: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.navigator.ICSE15_SequenceDiagram_MAVONavigatorItem
&& !isOwnView(
((edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.navigator.ICSE15_SequenceDiagram_MAVONavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例8: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.navigator.NECSIS14_ClassDiagramNavigatorItem
&& !isOwnView(((edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.navigator.NECSIS14_ClassDiagramNavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例9: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.navigator.NECSIS14_DatabaseSchemaNavigatorItem
&& !isOwnView(((edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.navigator.NECSIS14_DatabaseSchemaNavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例10: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof MIDNavigatorItem && !isOwnView(((MIDNavigatorItem) element).getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例11: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof MIDNavigatorItem && !isOwnView(((MIDNavigatorItem) element).getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例12: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.navigator.RelationalDatabase_MAVONavigatorItem
&& !isOwnView(
((edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.navigator.RelationalDatabase_MAVONavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例13: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof RelationalDatabaseNavigatorItem
&& !isOwnView(((RelationalDatabaseNavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例14: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof edu.toronto.cs.se.modelepedia.istar_mavo.diagram.navigator.IStar_MAVONavigatorItem
&& !isOwnView(
((edu.toronto.cs.se.modelepedia.istar_mavo.diagram.navigator.IStar_MAVONavigatorItem) element)
.getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}
示例15: updateLabel
import org.eclipse.jface.viewers.ViewerLabel; //导入依赖的package包/类
/**
* @generated
*/
public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof IStarNavigatorItem
&& !isOwnView(((IStarNavigatorItem) element).getView())) {
return;
}
label.setText(getText(element));
label.setImage(getImage(element));
}