Search in sources :

Example 1 with PropertySheetPage

use of org.eclipse.ui.views.properties.PropertySheetPage in project cubrid-manager by CUBRID.

the class ERSchemaEditor method getPropertySheetPage.

/**
	 * Returns the undoable <code>PropertySheetPage</code> for this editor.
	 * 
	 * @return the undoable <code>PropertySheetPage</code>
	 */
protected PropertySheetPage getPropertySheetPage() {
    if (undoablePropertySheetPage == null) {
        undoablePropertySheetPage = new PropertySheetPage();
        undoablePropertySheetPage.setRootEntry(GEFPlugin.createUndoablePropertySheetEntry(getCommandStack()));
    }
    return undoablePropertySheetPage;
}
Also used : PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage)

Example 2 with PropertySheetPage

use of org.eclipse.ui.views.properties.PropertySheetPage in project knime-core by knime.

the class WorkflowEditor method getPropertySheetPage.

/**
 * Returns the undoable <code>PropertySheetPage</code> for this editor.
 *
 * @return the undoable <code>PropertySheetPage</code>
 */
protected PropertySheetPage getPropertySheetPage() {
    if (m_undoablePropertySheetPage == null) {
        m_undoablePropertySheetPage = new PropertySheetPage();
        m_undoablePropertySheetPage.setRootEntry(new UndoablePropertySheetEntry(getCommandStack()));
    }
    return m_undoablePropertySheetPage;
}
Also used : IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) UndoablePropertySheetEntry(org.eclipse.gef.ui.properties.UndoablePropertySheetEntry)

Example 3 with PropertySheetPage

use of org.eclipse.ui.views.properties.PropertySheetPage in project iobserve-analysis by research-iobserve.

the class cloudprofileEditor method initializeEditingDomain.

/**
 * 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 cloudprofileItemProviderAdapterFactory());
    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>());
}
Also used : AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) CommandStack(org.eclipse.emf.common.command.CommandStack) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) ExtendedPropertySheetPage(org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage) CommandStackListener(org.eclipse.emf.common.command.CommandStackListener) ResourceItemProviderAdapterFactory(org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory) BasicCommandStack(org.eclipse.emf.common.command.BasicCommandStack) org.iobserve.planning.cloudprofile.provider.cloudprofileItemProviderAdapterFactory(org.iobserve.planning.cloudprofile.provider.cloudprofileItemProviderAdapterFactory) EventObject(java.util.EventObject) ReflectiveItemProviderAdapterFactory(org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory) Command(org.eclipse.emf.common.command.Command)

Example 4 with PropertySheetPage

use of org.eclipse.ui.views.properties.PropertySheetPage in project iobserve-analysis by research-iobserve.

the class cloudprofileEditor method dispose.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void dispose() {
    updateProblemIndication = false;
    ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
    getSite().getPage().removePartListener(partListener);
    adapterFactory.dispose();
    if (getActionBarContributor().getActiveEditor() == this) {
        getActionBarContributor().setActiveEditor(null);
    }
    for (PropertySheetPage propertySheetPage : propertySheetPages) {
        propertySheetPage.dispose();
    }
    if (contentOutlinePage != null) {
        contentOutlinePage.dispose();
    }
    super.dispose();
}
Also used : PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) ExtendedPropertySheetPage(org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage)

Example 5 with PropertySheetPage

use of org.eclipse.ui.views.properties.PropertySheetPage in project jbosstools-hibernate by jbosstools.

the class QueryPageTabView method getAdapter.

@Override
public <T> T getAdapter(Class<T> adapter) {
    if (adapter.equals(IPropertySheetPage.class)) {
        PropertySheetPage page = new PropertySheetPage();
        page.setPropertySourceProvider(new HibernatePropertySourceProvider(this));
        return adapter.cast(page);
    }
    return super.getAdapter(adapter);
}
Also used : IPropertySheetPage(org.eclipse.ui.views.properties.IPropertySheetPage) PropertySheetPage(org.eclipse.ui.views.properties.PropertySheetPage) HibernatePropertySourceProvider(org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider)

Aggregations

PropertySheetPage (org.eclipse.ui.views.properties.PropertySheetPage)64 IPropertySheetPage (org.eclipse.ui.views.properties.IPropertySheetPage)60 ExtendedPropertySheetPage (org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage)51 ArrayList (java.util.ArrayList)15 EventObject (java.util.EventObject)15 HashMap (java.util.HashMap)15 LinkedHashMap (java.util.LinkedHashMap)15 List (java.util.List)15 BasicCommandStack (org.eclipse.emf.common.command.BasicCommandStack)15 Command (org.eclipse.emf.common.command.Command)15 CommandStack (org.eclipse.emf.common.command.CommandStack)15 CommandStackListener (org.eclipse.emf.common.command.CommandStackListener)15 AdapterFactoryEditingDomain (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain)15 ComposedAdapterFactory (org.eclipse.emf.edit.provider.ComposedAdapterFactory)15 ReflectiveItemProviderAdapterFactory (org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory)15 ResourceItemProviderAdapterFactory (org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory)15 AdapterFactoryContentProvider (org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider)15 IActionBars (org.eclipse.ui.IActionBars)15 TabbedPropertySheetPage (org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)8 TechnicalIDItemProviderAdapterFactory (org.obeonetwork.dsl.technicalid.provider.TechnicalIDItemProviderAdapterFactory)8