當前位置: 首頁>>代碼示例>>Java>>正文


Java ResourceItemProviderAdapterFactory類代碼示例

本文整理匯總了Java中org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory的典型用法代碼示例。如果您正苦於以下問題:Java ResourceItemProviderAdapterFactory類的具體用法?Java ResourceItemProviderAdapterFactory怎麽用?Java ResourceItemProviderAdapterFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ResourceItemProviderAdapterFactory類屬於org.eclipse.emf.edit.provider.resource包,在下文中一共展示了ResourceItemProviderAdapterFactory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PreviewEditorImpl

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
public PreviewEditorImpl ()
{
    this.adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );
    this.adapterFactory.addAdapterFactory ( new ResourceItemProviderAdapterFactory () );
    this.adapterFactory.addAdapterFactory ( new ReflectiveItemProviderAdapterFactory () );

    final BasicCommandStack commandStack = new BasicCommandStack ();

    this.editingDomain = new AdapterFactoryEditingDomain ( this.adapterFactory, commandStack, new HashMap<Resource, Boolean> () );

    this.factoryContext = new FactoryContext () {

        @Override
        public void loadedResource ( final URI uri )
        {
            handleLoadedResource ( uri );
        }
    };

    ResourcesPlugin.getWorkspace ().addResourceChangeListener ( this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:PreviewEditorImpl.java

示例2: createEditingDomain

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
private void createEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new BibtexItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

	// Create the command stack that will notify this editor as commands are
	// executed.
	//
	BasicCommandStack commandStack = new BasicCommandStack();

	// Create the editing domain with a special command stack.
	//
	sharedEditingDomain = new AdapterFactoryEditingDomain(adapterFactory,commandStack, new HashMap<Resource, Boolean>());
}
 
開發者ID:sebastiangoetz,項目名稱:slr-toolkit,代碼行數:19,代碼來源:ModelRegistry.java

示例3: openFirstInstructionSelection

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
/**
 * Opens the {@link EObject first instruction} selection dialog.
 * 
 * @param shell
 *            the {@link Shell} to use for display
 * @param resourceSet
 *            the {@link ResourceSet} to get the first instruction from
 * @return the selected first instruction {@link URI} if any selected, <code>null</code> otherwise
 */
public static EObject openFirstInstructionSelection(final Shell shell, ResourceSet resourceSet) {
	final EObject res;
	final ComposedAdapterFactory fatory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	fatory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	fatory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

	ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell,
			new AdapterFactoryLabelProvider(fatory), new AdapterFactoryContentProvider(fatory));
	dialog.setTitle("Select first instruction");
	dialog.setMessage("Select the first instruction:");
	dialog.setInput(resourceSet);
	if (dialog.open() == Window.OK) {
		res = (EObject)dialog.getFirstResult();
	} else {
		res = null;
	}
	fatory.dispose();
	return res;
}
 
開發者ID:SiriusLab,項目名稱:ModelDebugging,代碼行數:30,代碼來源:DSLLaunchConfigurationTab.java

示例4: createViewer

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
protected TreeViewer createViewer(Composite composite) {
	TreeViewer treeViewer = new TreeViewer(composite);
	treeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory();
	adapterFactory.addAdapterFactory(new DecoratorEXTLibraryItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EXTLibraryItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new TreeItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	
	treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
	treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
	
	return treeViewer;
}
 
開發者ID:mbarbero,項目名稱:econ-na-2014-emf-edit,代碼行數:18,代碼來源:NotYourFathersSWT.java

示例5: CustomThreadItemProvider

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
/**
 * Constructor.
 * 
 * @param adapterFactory
 *            the {@link AdapterFactory}.
 */
public CustomThreadItemProvider(AdapterFactory adapterFactory) {
	super(adapterFactory);

	efactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	efactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	efactory.addAdapterFactory(debugFactory);
	efactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:16,代碼來源:CustomThreadItemProvider.java

示例6: CustomStackFrameItemProvider

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
/**
 * Constructor.
 * 
 * @param adapterFactory
 *            the {@link AdapterFactory}.
 */
public CustomStackFrameItemProvider(AdapterFactory adapterFactory) {
	super(adapterFactory);

	efactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	efactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	efactory.addAdapterFactory(debugFactory);
	efactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:16,代碼來源:CustomStackFrameItemProvider.java

示例7: CustomDebugTargetItemProvider

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
/**
 * Constructor.
 * 
 * @param adapterFactory
 *            the {@link AdapterFactory}.
 */
public CustomDebugTargetItemProvider(AdapterFactory adapterFactory) {
	super(adapterFactory);

	efactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	efactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	efactory.addAdapterFactory(debugFactory);
	efactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:16,代碼來源:CustomDebugTargetItemProvider.java

示例8: initLabelProvider

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
/**
 * Initializes the {@link ComposedAdapterFactory} used for markers.
 * 
 * @return the {@link ComposedAdapterFactory} used for markers
 */
private static ComposedAdapterFactory initLabelProvider() {
	final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	adapterFactory.addAdapterFactory(debugFactory);
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	return adapterFactory;
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:15,代碼來源:DSLBreakpoint.java

示例9: DSLDebugModelPresentation

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
/**
 * Constructor.
 */
public DSLDebugModelPresentation() {
	super();
	final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	adapterFactory.addAdapterFactory(debugFactory);
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	eLabelProvider = new AdapterFactoryLabelProvider(adapterFactory);
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:15,代碼來源:DSLDebugModelPresentation.java

示例10: SelectDiagramDefinitionPage

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
public SelectDiagramDefinitionPage(
		NewGemocDebugRepresentationWizard newGemocDebugRepresentationWizard) {
	super("Select diagram definition");
	this.newGemocDebugRepresentationWizard = newGemocDebugRepresentationWizard;

	adapterFactory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory
			.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory
			.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:13,代碼來源:SelectDiagramDefinitionPage.java

示例11: getAdapterFactory

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
public AdapterFactory getAdapterFactory() {
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	return adapterFactory;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:8,代碼來源:DwprofileAdapterFactoryProvider.java

示例12: getImage

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
protected Image getImage(EObject element) {
	if (!Platform.isRunning()) {
		return null;
	}
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(adapterFactory);
	return labelProvider.getImage(element);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:12,代碼來源:DwprofileCodeCompletionHelper.java

示例13: StackedchartsEditControl

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
public StackedchartsEditControl(Composite parent)
{
  super(parent, SWT.NONE);

  setLayout(new FillLayout());

  editDomain = new EditDomain();

  viewer = new ScrollingGraphicalViewer();

  // connect external Drop support
  // add Dataset to Axis

  viewer.addDropTargetListener(new ProxyDropTargetListener(
      new DatasetToAxisDropTargetListener(viewer),
      new DatasetToAxisLandingDropTargetListener(viewer),
      new ScatterSetToScatterSetContainerTargetListener(viewer),
      new DatasetToChartDropTargetListener(viewer)
      ));

  viewer.createControl(this);
  editDomain.addViewer(viewer);

  viewer.getControl().setBackground(ColorConstants.listBackground);

  viewer.setEditPartFactory(new StackedChartsEditPartFactory());

  // emf edit domain
  adapterFactory =
      new ComposedAdapterFactory(
          ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  BasicCommandStack commandStack = new BasicCommandStack();
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
  adapterFactory
      .addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  emfEditingDomain =
      new AdapterFactoryEditingDomain(adapterFactory, commandStack);

}
 
開發者ID:debrief,項目名稱:limpet,代碼行數:41,代碼來源:StackedchartsEditControl.java

示例14: getContentProviderForMetamodelViewer

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
public static IContentProvider getContentProviderForMetamodelViewer(Resource metamodelResource) {		
	// From EcoreEditor
    ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    
    return new AdapterFactoryContentProvider(adapterFactory);
    
}
 
開發者ID:anatlyzer,項目名稱:anatlyzer,代碼行數:12,代碼來源:UiUtils.java

示例15: getLabelProviderForMetamodelViewer

import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; //導入依賴的package包/類
public static ILabelProvider getLabelProviderForMetamodelViewer(Resource metamodelResource) {
	// From EcoreEditor
    ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
    
    return new AdapterFactoryLabelProvider(adapterFactory);
	
}
 
開發者ID:anatlyzer,項目名稱:anatlyzer,代碼行數:12,代碼來源:UiUtils.java


注:本文中的org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。