本文整理匯總了Java中org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry類的典型用法代碼示例。如果您正苦於以下問題:Java ExtendedImageRegistry類的具體用法?Java ExtendedImageRegistry怎麽用?Java ExtendedImageRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ExtendedImageRegistry類屬於org.eclipse.emf.edit.ui.provider包,在下文中一共展示了ExtendedImageRegistry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configureTree
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
protected void configureTree() {
TreeViewer treeViewer = getTreeViewer();
treeViewer.setLabelProvider(labelProvider);
treeViewer.setContentProvider(contentProvider);
contentProvider.setFilterAndSorter(filterAndSorter);
treeViewer.setUseHashlookup(true);
// access EMF's image registry now, since it needs a UI-thread.
ExtendedImageRegistry.getInstance();
if(treeProvider instanceof BackgroundOutlineTreeProvider) {
new Job("Initializing outline") {
@Override
protected IStatus run(IProgressMonitor monitor) {
initializeTreeContent();
return Status.OK_STATUS;
}
}.schedule();
} else {
initializeTreeContent();
}
}
示例2: getImage
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
@Override
public Image getImage(Object element) {
if (element instanceof DynamicActivityGroup) {
DynamicActivityGroup dag = (DynamicActivityGroup) element;
Object value = dag.getValue();
if (value instanceof EEnumLiteral) {
return null;
}
IItemLabelProvider lp = EMFUtils.adapt(value, IItemLabelProvider.class);
if (lp != null) {
Object image = lp.getImage(value);
return ExtendedImageRegistry.getInstance().getImage(image);
}
return null;
}
return delegate.getImage(element);
}
示例3: createSubSection
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
public static Composite createSubSection(FormToolkit toolkit, Composite parent, EObject eObject, boolean hasLabel) {
Composite subSection = null;
IItemLabelProvider labelProvider = EMFUtils.adapt(eObject, IItemLabelProvider.class);
if (labelProvider != null) {
String text = labelProvider.getText(eObject);
Image image = null;
Object imageURL = labelProvider.getImage(eObject);
if (imageURL != null) {
try {
image = ExtendedImageRegistry.getInstance().getImage(imageURL);
} catch (Exception e) {
Logger.getLogger(DetailFormToolkit.class).error("failed to get image", e);
}
}
Section section = createSection(toolkit, parent, text, image);
subSection = toolkit.createComposite(section);
GridLayout layout = new GridLayout((hasLabel) ? 2 : 1, false);
layout.verticalSpacing = 2;
layout.horizontalSpacing = 10;
subSection.setLayout(layout);
section.setClient(subSection);
}
return subSection;
}
示例4: buildPropertySection
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
private void buildPropertySection(Composite parent, EObject target, List<IItemPropertyDescriptor> pds, IItemLabelProvider labeler) {
if (!hasVisibleDescriptors(target, pds))
return;
String text = null;
Image image = null;
if (labeler != null) {
text = labeler.getText(target);
Object imageURL = labeler.getImage(text);
if (imageURL != null) {
try {
image = ExtendedImageRegistry.getInstance().getImage(imageURL);
} catch (Exception e) {
LogUtil.error("failed to get image", e);
}
}
}
buildPropertySection(parent, target, pds, text, image);
}
示例5: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
setWindowTitle(SmarthomeEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(SmarthomeEditorPlugin.INSTANCE.getImage("full/wizban/NewSmarthome")));
}
示例6: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
setWindowTitle(MetamodelEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(MetamodelEditorPlugin.INSTANCE.getImage("full/wizban/NewMetamodel")));
}
示例7: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
setWindowTitle(TracingannotationsEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(TracingannotationsEditorPlugin.INSTANCE.getImage("full/wizban/NewTracingannotations")));
}
示例8: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* {@inheritDoc}
*
* @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
public void init(final IWorkbench wkbch, final IStructuredSelection sel) {
this.workbench = wkbch;
setWindowTitle("New Viewpoint Specification Project");
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE
.getImageDescriptor(SiriusEditorPlugin.INSTANCE
.getImage("full/wizban/banner_viewpoint_specification_project.gif")));
}
示例9: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void init ( IWorkbench workbench, IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( NextGenerationProtocolEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( NextGenerationProtocolEditorPlugin.INSTANCE.getImage ( "full/wizban/NewProtocol" ) ) ); //$NON-NLS-1$
}
示例10: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void init ( final IWorkbench workbench, final IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( ChartEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE
.getImageDescriptor ( ChartEditorPlugin.INSTANCE
.getImage ( "full/wizban/NewChart" ) ) ); //$NON-NLS-1$
}
示例11: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init ( IWorkbench workbench, IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( DetailViewEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( DetailViewEditorPlugin.INSTANCE.getImage ( "full/wizban/NewDetailView" ) ) ); //$NON-NLS-1$
}
示例12: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void init ( final IWorkbench workbench, final IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( VisualInterfaceEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( VisualInterfaceEditorPlugin.INSTANCE.getImage ( "full/wizban/NewVisualInterface.png" ) ) ); //$NON-NLS-1$
}
示例13: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init ( IWorkbench workbench, IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( WorldEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( WorldEditorPlugin.INSTANCE.getImage ( "full/wizban/NewDeployment" ) ) ); //$NON-NLS-1$
}
示例14: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init ( IWorkbench workbench, IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( WorldEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( WorldEditorPlugin.INSTANCE.getImage ( "full/wizban/NewSetup" ) ) ); //$NON-NLS-1$
}
示例15: init
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; //導入依賴的package包/類
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init ( IWorkbench workbench, IStructuredSelection selection )
{
this.workbench = workbench;
this.selection = selection;
setWindowTitle ( WorldEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( WorldEditorPlugin.INSTANCE.getImage ( "full/wizban/NewProfile" ) ) ); //$NON-NLS-1$
}