当前位置: 首页>>代码示例>>Java>>正文


Java ComposedAdapterFactory.addAdapterFactory方法代码示例

本文整理汇总了Java中org.eclipse.emf.edit.provider.ComposedAdapterFactory.addAdapterFactory方法的典型用法代码示例。如果您正苦于以下问题:Java ComposedAdapterFactory.addAdapterFactory方法的具体用法?Java ComposedAdapterFactory.addAdapterFactory怎么用?Java ComposedAdapterFactory.addAdapterFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.emf.edit.provider.ComposedAdapterFactory的用法示例。


在下文中一共展示了ComposedAdapterFactory.addAdapterFactory方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CustomDebugTargetItemProvider

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的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

示例2: initLabelProvider

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的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

示例3: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new SlaItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new OCCIItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

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

	// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
	//
	commandStack.addCommandStackListener
		(new CommandStackListener() {
			 public void commandStackChanged(final EventObject event) {
				 getContainer().getDisplay().asyncExec
					 (new Runnable() {
						  public void run() {
							  firePropertyChange(IEditorPart.PROP_DIRTY);

							  // Try to select the affected objects.
							  //
							  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
							  if (mostRecentCommand != null) {
								  setSelectionToViewer(mostRecentCommand.getAffectedObjects());
							  }
							  for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
								  PropertySheetPage propertySheetPage = i.next();
								  if (propertySheetPage.getControl().isDisposed()) {
									  i.remove();
								  }
								  else {
									  propertySheetPage.refresh();
								  }
							  }
						  }
					  });
			 }
		 });

	// Create the editing domain with a special command stack.
	//
	editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:55,代码来源:SlaEditor.java

示例4: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

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

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

	// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
	//
	commandStack.addCommandStackListener
		(new CommandStackListener() {
			 public void commandStackChanged(final EventObject event) {
				 getContainer().getDisplay().asyncExec
					 (new Runnable() {
						  public void run() {
							  firePropertyChange(IEditorPart.PROP_DIRTY);

							  // Try to select the affected objects.
							  //
							  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
							  if (mostRecentCommand != null) {
								  setSelectionToViewer(mostRecentCommand.getAffectedObjects());
							  }
							  for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
								  PropertySheetPage propertySheetPage = i.next();
								  if (propertySheetPage.getControl().isDisposed()) {
									  i.remove();
								  }
								  else {
									  propertySheetPage.refresh();
								  }
							  }
						  }
					  });
			 }
		 });

	// Create the editing domain with a special command stack.
	//
	editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:54,代码来源:MetamodelEditor.java

示例5: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

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

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

	// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
	//
	commandStack.addCommandStackListener
		(new CommandStackListener() {
			 public void commandStackChanged(final EventObject event) {
				 getContainer().getDisplay().asyncExec
					 (new Runnable() {
						  public void run() {
							  firePropertyChange(IEditorPart.PROP_DIRTY);

							  // Try to select the affected objects.
							  //
							  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
							  if (mostRecentCommand != null) {
								  setSelectionToViewer(mostRecentCommand.getAffectedObjects());
							  }
							  for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
								  PropertySheetPage propertySheetPage = i.next();
								  if (propertySheetPage.getControl().isDisposed()) {
									  i.remove();
								  }
								  else {
									  propertySheetPage.refresh();
								  }
							  }
						  }
					  });
			 }
		 });

	// Create the editing domain with a special command stack.
	//
	editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:54,代码来源:NfpEditor.java

示例6: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new Time4sysItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new AnalysisItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new DesignItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new GqamItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new GrmItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new MappingItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new TraceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

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

	// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
	//
	commandStack.addCommandStackListener
		(new CommandStackListener() {
			 public void commandStackChanged(final EventObject event) {
				 getContainer().getDisplay().asyncExec
					 (new Runnable() {
						  public void run() {
							  firePropertyChange(IEditorPart.PROP_DIRTY);

							  // Try to select the affected objects.
							  //
							  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
							  if (mostRecentCommand != null) {
								  setSelectionToViewer(mostRecentCommand.getAffectedObjects());
							  }
							  for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
								  PropertySheetPage propertySheetPage = i.next();
								  if (propertySheetPage.getControl().isDisposed()) {
									  i.remove();
								  }
								  else {
									  propertySheetPage.refresh();
								  }
							  }
						  }
					  });
			 }
		 });

	// Create the editing domain with a special command stack.
	//
	editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:60,代码来源:Time4sysEditor.java

示例7: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

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

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
            ( new CommandStackListener ()
            {
                public void commandStackChanged ( final EventObject event )
                {
                    getContainer ().getDisplay ().asyncExec
                            ( new Runnable ()
                            {
                                public void run ()
                                {
                                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                                    // Try to select the affected objects.
                                    //
                                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                                    if ( mostRecentCommand != null )
                                    {
                                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                                    }
                                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                                    {
                                        PropertySheetPage propertySheetPage = i.next ();
                                        if ( propertySheetPage.getControl ().isDisposed () )
                                        {
                                            i.remove ();
                                        }
                                        else
                                        {
                                            propertySheetPage.refresh ();
                                        }
                                    }
                                }
                            } );
                }
            } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:63,代码来源:ItemEditor.java

示例8: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

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

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

	// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
	//
	commandStack.addCommandStackListener
		(new CommandStackListener() {
			 public void commandStackChanged(final EventObject event) {
				 getContainer().getDisplay().asyncExec
					 (new Runnable() {
						  public void run() {
							  firePropertyChange(IEditorPart.PROP_DIRTY);

							  // Try to select the affected objects.
							  //
							  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
							  if (mostRecentCommand != null) {
								  setSelectionToViewer(mostRecentCommand.getAffectedObjects());
							  }
							  for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
								  PropertySheetPage propertySheetPage = i.next();
								  if (propertySheetPage.getControl().isDisposed()) {
									  i.remove();
								  }
								  else {
									  propertySheetPage.refresh();
								  }
							  }
						  }
					  });
			 }
		 });

	// Create the editing domain with a special command stack.
	//
	editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:54,代码来源:TraceEditor.java

示例9: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

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

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
            ( new CommandStackListener ()
            {
                public void commandStackChanged ( final EventObject event )
                {
                    getContainer ().getDisplay ().asyncExec
                            ( new Runnable ()
                            {
                                public void run ()
                                {
                                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                                    // Try to select the affected objects.
                                    //
                                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                                    if ( mostRecentCommand != null )
                                    {
                                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                                    }
                                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                                    {
                                        PropertySheetPage propertySheetPage = i.next ();
                                        if ( propertySheetPage.getControl ().isDisposed () )
                                        {
                                            i.remove ();
                                        }
                                        else
                                        {
                                            propertySheetPage.refresh ();
                                        }
                                    }
                                }
                            } );
                }
            } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:63,代码来源:SecurityEditor.java

示例10: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

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

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

	// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
	//
	commandStack.addCommandStackListener
		(new CommandStackListener() {
			 public void commandStackChanged(final EventObject event) {
				 getContainer().getDisplay().asyncExec
					 (new Runnable() {
						  public void run() {
							  firePropertyChange(IEditorPart.PROP_DIRTY);

							  // Try to select the affected objects.
							  //
							  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
							  if (mostRecentCommand != null) {
								  setSelectionToViewer(mostRecentCommand.getAffectedObjects());
							  }
							  for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
								  PropertySheetPage propertySheetPage = i.next();
								  if (propertySheetPage.getControl().isDisposed()) {
									  i.remove();
								  }
								  else {
									  propertySheetPage.refresh();
								  }
							  }
						  }
					  });
			 }
		 });

	// Create the editing domain with a special command stack.
	//
	editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:54,代码来源:MappingEditor.java

示例11: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

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

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
            ( new CommandStackListener ()
            {
                public void commandStackChanged ( final EventObject event )
                {
                    getContainer ().getDisplay ().asyncExec
                            ( new Runnable ()
                            {
                                public void run ()
                                {
                                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                                    // Try to select the affected objects.
                                    //
                                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                                    if ( mostRecentCommand != null )
                                    {
                                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                                    }
                                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                                    {
                                        PropertySheetPage propertySheetPage = i.next ();
                                        if ( propertySheetPage.getControl ().isDisposed () )
                                        {
                                            i.remove ();
                                        }
                                        else
                                        {
                                            propertySheetPage.refresh ();
                                        }
                                    }
                                }
                            } );
                }
            } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:63,代码来源:ConfigurationEditor.java

示例12: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

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

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
            ( new CommandStackListener ()
            {
                public void commandStackChanged ( final EventObject event )
                {
                    getContainer ().getDisplay ().asyncExec
                            ( new Runnable ()
                            {
                                public void run ()
                                {
                                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                                    // Try to select the affected objects.
                                    //
                                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                                    if ( mostRecentCommand != null )
                                    {
                                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                                    }
                                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                                    {
                                        PropertySheetPage propertySheetPage = i.next ();
                                        if ( propertySheetPage.getControl ().isDisposed () )
                                        {
                                            i.remove ();
                                        }
                                        else
                                        {
                                            propertySheetPage.refresh ();
                                        }
                                    }
                                }
                            } );
                }
            } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:63,代码来源:VisualInterfaceEditor.java

示例13: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

    adapterFactory.addAdapterFactory ( new ResourceItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new WorldItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new OsgiItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ProfileItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new DeploymentItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new SetupItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new EcoreItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ConfigurationItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ScriptItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new SecurityItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ReflectiveItemProviderAdapterFactory () );

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener ( new CommandStackListener () {
        public void commandStackChanged ( final EventObject event )
        {
            getContainer ().getDisplay ().asyncExec ( new Runnable () {
                public void run ()
                {
                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                    // Try to select the affected objects.
                    //
                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                    if ( mostRecentCommand != null )
                    {
                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                    }
                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                    {
                        PropertySheetPage propertySheetPage = i.next ();
                        if ( propertySheetPage.getControl ().isDisposed () )
                        {
                            i.remove ();
                        }
                        else
                        {
                            propertySheetPage.refresh ();
                        }
                    }
                }
            } );
        }
    } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:67,代码来源:DeploymentEditor.java

示例14: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

    adapterFactory.addAdapterFactory ( new ResourceItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ComponentItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new EcoreItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ConfigurationItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new GlobalizeItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new InfrastructureItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ItemItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ScriptItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new SecurityItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new WorldItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new OsgiItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ProfileItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new DeploymentItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new SetupItemProviderAdapterFactory () );
    adapterFactory.addAdapterFactory ( new ReflectiveItemProviderAdapterFactory () );

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener ( new CommandStackListener () {
        public void commandStackChanged ( final EventObject event )
        {
            getContainer ().getDisplay ().asyncExec ( new Runnable () {
                public void run ()
                {
                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                    // Try to select the affected objects.
                    //
                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                    if ( mostRecentCommand != null )
                    {
                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                    }
                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                    {
                        PropertySheetPage propertySheetPage = i.next ();
                        if ( propertySheetPage.getControl ().isDisposed () )
                        {
                            i.remove ();
                        }
                        else
                        {
                            propertySheetPage.refresh ();
                        }
                    }
                }
            } );
        }
    } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:71,代码来源:ComponentEditor.java

示例15: initializeEditingDomain

import org.eclipse.emf.edit.provider.ComposedAdapterFactory; //导入方法依赖的package包/类
/**
 * This sets up the editing domain for the model editor.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain ()
{
    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );

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

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

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener ( new CommandStackListener () {
        public void commandStackChanged ( final EventObject event )
        {
            getContainer ().getDisplay ().asyncExec ( new Runnable () {
                public void run ()
                {
                    firePropertyChange ( IEditorPart.PROP_DIRTY );

                    // Try to select the affected objects.
                    //
                    Command mostRecentCommand = ( (CommandStack)event.getSource () ).getMostRecentCommand ();
                    if ( mostRecentCommand != null )
                    {
                        setSelectionToViewer ( mostRecentCommand.getAffectedObjects () );
                    }
                    for ( Iterator<PropertySheetPage> i = propertySheetPages.iterator (); i.hasNext (); )
                    {
                        PropertySheetPage propertySheetPage = i.next ();
                        if ( propertySheetPage.getControl ().isDisposed () )
                        {
                            i.remove ();
                        }
                        else
                        {
                            propertySheetPage.refresh ();
                        }
                    }
                }
            } );
        }
    } );

    // Create the editing domain with a special command stack.
    //
    editingDomain = new AdapterFactoryEditingDomain ( adapterFactory, commandStack, new HashMap<Resource, Boolean> () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:59,代码来源:MemoryEditor.java


注:本文中的org.eclipse.emf.edit.provider.ComposedAdapterFactory.addAdapterFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。