Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 61428 Details for
Bug 173499
Enhance org.eclipse.gmf.graphdef.editor with other figures, colors support and more usable properties organization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Generated part of changes for switching styles tab to the joint property sheet metamodel
patch_generated.txt (text/plain), 51.26 KB, created by
Anna Karjakina
on 2007-03-20 13:07:57 EDT
(
hide
)
Description:
Generated part of changes for switching styles tab to the joint property sheet metamodel
Filename:
MIME Type:
Creator:
Anna Karjakina
Created:
2007-03-20 13:07:57 EDT
Size:
51.26 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.graphdef.editor >Index: src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDocumentProvider.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDocumentProvider.java,v >retrieving revision 1.6 >diff -u -r1.6 GMFGraphDocumentProvider.java >--- src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDocumentProvider.java 2 Mar 2007 19:21:06 -0000 1.6 >+++ src/org/eclipse/gmf/graphdef/editor/part/GMFGraphDocumentProvider.java 20 Mar 2007 17:04:00 -0000 >@@ -29,7 +29,9 @@ > import org.eclipse.core.runtime.Status; > import org.eclipse.core.runtime.jobs.ISchedulingRule; > import org.eclipse.core.runtime.jobs.MultiRule; >+import org.eclipse.emf.common.notify.Adapter; > import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.common.notify.Notifier; > import org.eclipse.emf.common.ui.URIEditorInput; > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.resource.Resource; >@@ -39,6 +41,7 @@ > import org.eclipse.emf.transaction.NotificationFilter; > import org.eclipse.emf.transaction.TransactionalEditingDomain; > import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; >+import org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory; > import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider; > import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument; > import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; >@@ -190,9 +193,8 @@ > if (!resource.isLoaded()) { > try { > Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions()); >- // @see 171060 >- // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, >- // Boolean.TRUE); >+ // @see 171060 >+ // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE); > resource.load(options); > } catch (IOException e) { > resource.unload(); >Index: src/org/eclipse/gmf/graphdef/editor/part/GMFGraphCreationWizardPage.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphCreationWizardPage.java,v >retrieving revision 1.5 >diff -u -r1.5 GMFGraphCreationWizardPage.java >--- src/org/eclipse/gmf/graphdef/editor/part/GMFGraphCreationWizardPage.java 2 Mar 2007 19:21:06 -0000 1.5 >+++ src/org/eclipse/gmf/graphdef/editor/part/GMFGraphCreationWizardPage.java 20 Mar 2007 17:04:00 -0000 >@@ -49,7 +49,7 @@ > * @generated > */ > public URI getURI() { >- return URI.createPlatformResourceURI(getFilePath().toString(), false); >+ return URI.createPlatformResourceURI(getFilePath().toString()); > } > > /** >Index: src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java,v >retrieving revision 1.11 >diff -u -r1.11 GMFGraphNewDiagramFileWizard.java >--- src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java 2 Mar 2007 19:21:06 -0000 1.11 >+++ src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java 20 Mar 2007 17:04:00 -0000 >@@ -255,7 +255,7 @@ > */ > private boolean validatePage() { > if (myDiagramRoot == null) { >- setErrorMessage("No diagram root element selected"); >+ setErrorMessage("Diagram root element is not selected"); > return false; > } > boolean result = ViewService.getInstance().provides( >Index: src/org/eclipse/gmf/graphdef/editor/sheet/LayoutPropertySection.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/LayoutPropertySection.java,v >retrieving revision 1.1 >diff -u -r1.1 LayoutPropertySection.java >--- src/org/eclipse/gmf/graphdef/editor/sheet/LayoutPropertySection.java 2 Mar 2007 15:39:20 -0000 1.1 >+++ src/org/eclipse/gmf/graphdef/editor/sheet/LayoutPropertySection.java 20 Mar 2007 17:04:00 -0000 >@@ -1,5 +1,5 @@ > /* >- * Copyright (c) 2007 Borland Software Corporation and others. >+ * Copyright (c) 2006, 2007 Borland Software Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -13,76 +13,21 @@ > import java.util.ArrayList; > import java.util.Collection; > import java.util.Iterator; >-import java.util.LinkedList; >-import java.util.List; > > import org.eclipse.core.runtime.IAdaptable; >-import org.eclipse.emf.common.notify.AdapterFactory; >-import org.eclipse.emf.ecore.EClass; >-import org.eclipse.emf.ecore.EObject; >-import org.eclipse.emf.ecore.EStructuralFeature; >-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; >-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; >-import org.eclipse.emf.edit.provider.IItemPropertySource; >-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; >-import org.eclipse.emf.transaction.TransactionalEditingDomain; >-import org.eclipse.emf.transaction.util.TransactionUtil; > import org.eclipse.gef.EditPart; >-import org.eclipse.gmf.gmfgraph.GMFGraphFactory; >-import org.eclipse.gmf.gmfgraph.GMFGraphPackage; >-import org.eclipse.gmf.gmfgraph.Layoutable; >-import org.eclipse.gmf.gmfgraph.XYLayoutData; >-import org.eclipse.gmf.graphdef.editor.part.GMFGraphDiagramEditorPlugin; >-import org.eclipse.gmf.runtime.common.ui.services.properties.ICompositePropertySource; >-import org.eclipse.gmf.runtime.common.ui.services.properties.descriptors.CompositePropertySource; >-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection; >-import org.eclipse.gmf.runtime.emf.ui.properties.descriptors.EMFCompositePropertySource; > import org.eclipse.gmf.runtime.notation.View; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.StructuredSelection; > import org.eclipse.ui.IWorkbenchPart; >-import org.eclipse.ui.views.properties.IPropertySource; >-import org.eclipse.ui.views.properties.IPropertySourceProvider; > > /** > * @generated > */ >-public class LayoutPropertySection extends AdvancedPropertySection implements IPropertySourceProvider { >- >- /** >- * @generated >- */ >- public IPropertySource getPropertySource(Object object) { >- if (object instanceof Layoutable) { >- ICompositePropertySource compositeSource = new CompositePropertySource(object); >- >- IItemPropertyDescriptor layoutPropertyDescriptor = new LayoutItemPropertyDescriptor(GMFGraphDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory(), "Layout Manager", >- "Layout Manager", GMFGraphPackage.eINSTANCE.getLayoutable_Layout(), true, new EObject[] { GMFGraphFactory.eINSTANCE.createBorderLayout(), >- GMFGraphFactory.eINSTANCE.createCustomLayout(), GMFGraphFactory.eINSTANCE.createFlowLayout(), GMFGraphFactory.eINSTANCE.createGridLayout(), >- GMFGraphFactory.eINSTANCE.createStackLayout(), GMFGraphFactory.eINSTANCE.createXYLayout() }); >- compositeSource.addPropertySource(new EMFCompositePropertySource(object, new SingleDescriptorPropertySource(layoutPropertyDescriptor), "EMF")); //$NON-NLS-1$ >- >- IItemPropertyDescriptor layoutDataPropertyDescriptor = new LayoutItemPropertyDescriptor(GMFGraphDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory(), "Layout Data", >- "Layout Data", GMFGraphPackage.eINSTANCE.getLayoutable_LayoutData(), true, new EObject[] { GMFGraphFactory.eINSTANCE.createBorderLayoutData(), >- GMFGraphFactory.eINSTANCE.createCustomLayoutData(), GMFGraphFactory.eINSTANCE.createGridLayoutData(), GMFGraphFactory.eINSTANCE.createXYLayoutData() }); >- compositeSource.addPropertySource(new EMFCompositePropertySource(object, new SingleDescriptorPropertySource(layoutDataPropertyDescriptor), "EMF")); //$NON-NLS-1$ >- >- return compositeSource; >- } >- return null; >- >- } >- >- /** >- * @generated >- */ >- protected IPropertySourceProvider getPropertySourceProvider() { >- return this; >- } >+public class LayoutPropertySection extends CustomLayoutPropertySection { > > /** > * Modify/unwrap selection. >- * > * @generated > */ > protected Object transformSelection(Object selected) { >@@ -105,6 +50,20 @@ > /** > * @generated > */ >+ private Collection mySavedSelection = new ArrayList(); >+ >+ /** >+ * @generated >+ */ >+ public Collection getSavedSelection() { >+ //StructuredSelection structured = (StructuredSelection) super.getSelection(); >+ //return structured.toList(); >+ return mySavedSelection; >+ } >+ >+ /** >+ * @generated >+ */ > public void setInput(IWorkbenchPart part, ISelection selection) { > if (selection.isEmpty() || false == selection instanceof StructuredSelection) { > super.setInput(part, selection); >@@ -118,129 +77,8 @@ > transformedSelection.add(r); > } > } >+ mySavedSelection = transformedSelection; > super.setInput(part, new StructuredSelection(transformedSelection)); > } > >- /** >- * @generated >- */ >- protected AdapterFactory getAdapterFactory(Object object) { >- if (getEditingDomain() instanceof AdapterFactoryEditingDomain) { >- return ((AdapterFactoryEditingDomain) getEditingDomain()).getAdapterFactory(); >- } >- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(object); >- if (editingDomain != null) { >- return ((AdapterFactoryEditingDomain) editingDomain).getAdapterFactory(); >- } >- return null; >- } >- >- /** >- * @generated >- */ >- private static class SingleDescriptorPropertySource implements IItemPropertySource { >- >- /** >- * @generated >- */ >- private IItemPropertyDescriptor myPropertyDescriptor; >- >- /** >- * @generated >- */ >- private List myDescriptors = new LinkedList(); >- >- /** >- * @generated >- */ >- SingleDescriptorPropertySource(IItemPropertyDescriptor propertyDescriptor) { >- myPropertyDescriptor = propertyDescriptor; >- myDescriptors.add(myPropertyDescriptor); >- } >- >- /** >- * @generated >- */ >- public List getPropertyDescriptors(Object object) { >- return myDescriptors; >- } >- >- /** >- * @generated >- */ >- public IItemPropertyDescriptor getPropertyDescriptor(Object object, Object propertyID) { >- return myPropertyDescriptor; >- } >- >- /** >- * @generated >- */ >- public Object getEditableValue(Object object) { >- return object; >- } >- } >- >- /** >- * @generated >- */ >- public static class LayoutItemPropertyDescriptor extends ItemPropertyDescriptor { >- >- /** >- * @generated >- */ >- private EObject[] myValues; >- >- /** >- * @generated >- */ >- LayoutItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, EObject[] valueInstances) { >- super(adapterFactory, displayName, description, feature, isSettable); >- myValues = valueInstances; >- } >- >- /** >- * @generated >- */ >- protected Collection getComboBoxObjects(Object object) { >- if (object instanceof EObject) { >- EObject eObject = (EObject) object; >- Object currentValue = getValue(eObject, feature); >- Collection result = new ArrayList(); >- result.add(currentValue); >- EClass valueEClass = currentValue instanceof EObject ? ((EObject) currentValue).eClass() : null; >- for (int i = 0; i < myValues.length; i++) { >- if (myValues[i].eClass() == valueEClass) { >- continue; >- } >- result.add(myValues[i]); >- } >- if (currentValue != null) { >- result.add(null); >- } >- return result; >- } >- return null; >- } >- >- /** >- * @generated >- */ >- public void setPropertyValue(Object object, Object value) { >- if (value instanceof EObject) { >- EClass eClass = ((EObject) value).eClass(); >- value = eClass.getEPackage().getEFactoryInstance().create(eClass); >- if (value instanceof XYLayoutData) { >- XYLayoutData xyLayoutData = (XYLayoutData) value; >- xyLayoutData.setTopLeft(GMFGraphFactory.eINSTANCE.createPoint()); >- xyLayoutData.getTopLeft().setX(0); >- xyLayoutData.getTopLeft().setY(0); >- xyLayoutData.setSize(GMFGraphFactory.eINSTANCE.createDimension()); >- xyLayoutData.getSize().setDx(40); >- xyLayoutData.getSize().setDy(40); >- } >- } >- super.setPropertyValue(object, value); >- } >- } >- > } >Index: src/org/eclipse/gmf/graphdef/editor/sheet/PointsPropertySection.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/sheet/PointsPropertySection.java,v >retrieving revision 1.1 >diff -u -r1.1 PointsPropertySection.java >--- src/org/eclipse/gmf/graphdef/editor/sheet/PointsPropertySection.java 2 Mar 2007 15:39:20 -0000 1.1 >+++ src/org/eclipse/gmf/graphdef/editor/sheet/PointsPropertySection.java 20 Mar 2007 17:04:00 -0000 >@@ -1,5 +1,5 @@ > /* >- * Copyright (c) 2007 Borland Software Corporation and others. >+ * Copyright (c) 2006, 2007 Borland Software Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -102,7 +102,6 @@ > > /** > * Modify/unwrap selection. >- * > * @generated > */ > protected Object transformSelection(Object selected) { >Index: src/org/eclipse/gmf/graphdef/editor/sheet/CustomPropertySection.java >=================================================================== >RCS file: src/org/eclipse/gmf/graphdef/editor/sheet/CustomPropertySection.java >diff -N src/org/eclipse/gmf/graphdef/editor/sheet/CustomPropertySection.java >--- src/org/eclipse/gmf/graphdef/editor/sheet/CustomPropertySection.java 2 Mar 2007 15:39:20 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,113 +0,0 @@ >-/* >- * Copyright (c) 2007 Borland Software Corporation and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * Borland Software Corporation - initial API and implementation >- */ >-package org.eclipse.gmf.graphdef.editor.sheet; >- >-import java.util.ArrayList; >-import java.util.Collection; >-import java.util.Iterator; >- >-import org.eclipse.core.runtime.IAdaptable; >-import org.eclipse.gef.EditPart; >-import org.eclipse.gmf.gmfgraph.LineKind; >-import org.eclipse.gmf.graphdef.editor.part.GMFGraphDiagramEditorPlugin; >-import org.eclipse.gmf.runtime.notation.View; >-import org.eclipse.jface.resource.ImageRegistry; >-import org.eclipse.jface.viewers.ISelection; >-import org.eclipse.jface.viewers.StructuredSelection; >-import org.eclipse.ui.IWorkbenchPart; >- >-/** >- * @generated >- */ >-public class CustomPropertySection extends AbstractCustomPropertySection { >- >- /** >- * Modify/unwrap selection. >- * >- * @generated >- */ >- protected Object transformSelection(Object selected) { >- if (selected instanceof EditPart) { >- Object model = ((EditPart) selected).getModel(); >- return model instanceof View ? ((View) model).getElement() : null; >- } >- if (selected instanceof View) { >- return ((View) selected).getElement(); >- } >- if (selected instanceof IAdaptable) { >- View view = (View) ((IAdaptable) selected).getAdapter(View.class); >- if (view != null) { >- return view.getElement(); >- } >- } >- return selected; >- } >- >- /** >- * @generated >- */ >- private Collection mySavedSelection = new ArrayList(); >- >- /** >- * @generated >- */ >- public Collection getSavedSelection() { >- // StructuredSelection structured = (StructuredSelection) >- // super.getSelection(); >- // return structured.toList(); >- return mySavedSelection; >- } >- >- /** >- * @generated >- */ >- public void setInput(IWorkbenchPart part, ISelection selection) { >- if (selection.isEmpty() || false == selection instanceof StructuredSelection) { >- super.setInput(part, selection); >- return; >- } >- final StructuredSelection structuredSelection = ((StructuredSelection) selection); >- ArrayList transformedSelection = new ArrayList(structuredSelection.size()); >- for (Iterator it = structuredSelection.iterator(); it.hasNext();) { >- Object r = transformSelection(it.next()); >- if (r != null) { >- transformedSelection.add(r); >- } >- } >- mySavedSelection = transformedSelection; >- super.setInput(part, new StructuredSelection(transformedSelection)); >- } >- >- /** >- * @generated >- */ >- private static ImageRegistry ourImageRegistry = new ImageRegistry(); >- >- /** >- * @generated >- */ >- static { >- ourImageRegistry.put(LineKind.LINE_SOLID_LITERAL.getLiteral(), GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_solid.png")); >- ourImageRegistry.put(LineKind.LINE_DASH_LITERAL.getLiteral(), GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dash.png")); >- ourImageRegistry.put(LineKind.LINE_DOT_LITERAL.getLiteral(), GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dot.png")); >- ourImageRegistry.put(LineKind.LINE_DASHDOT_LITERAL.getLiteral(), GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dashdot.png")); >- ourImageRegistry.put(LineKind.LINE_DASHDOTDOT_LITERAL.getLiteral(), GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dashdotdot.png")); >- ourImageRegistry.put(LineKind.LINE_CUSTOM_LITERAL.getLiteral(), GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_custom.png")); >- } >- >- /** >- * @generated >- */ >- public ImageRegistry getImageRegistry() { >- return ourImageRegistry; >- } >- >-} >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/plugin.xml,v >retrieving revision 1.13 >diff -u -r1.13 plugin.xml >--- plugin.xml 2 Mar 2007 15:39:20 -0000 1.13 >+++ plugin.xml 20 Mar 2007 17:04:00 -0000 >@@ -1,7 +1,7 @@ > <?xml version="1.0" encoding="UTF-8"?> > <?eclipse version="3.0"?> > <!-- >- Copyright (c) 2006 Borland Software Corporation and others. >+ Copyright (c) 2006, 2007 Borland Software Corporation and others. > All rights reserved. This program and the accompanying materials > are made available under the terms of the Eclipse Public License v1.0 > which accompanies this distribution, and is available at >@@ -54,10 +54,10 @@ > </wizard> > </extension> > >- <extension point="org.eclipse.ui.popupMenus"> >+ <extension point="org.eclipse.ui.popupMenus"> > <?gmfgen generated="true"?> > <objectContribution >- id="org.eclipse.gmf.graphdef.editor.ui.objectContribution.IFile1" >+ id="org.eclipse.gmf.graphdef.editor.InitDiagram" > nameFilter="*.gmfgraph" > objectClass="org.eclipse.core.resources.IFile"> > <action >@@ -65,9 +65,13 @@ > class="org.eclipse.gmf.graphdef.editor.part.GMFGraphInitDiagramFileAction" > menubarPath="additions" > enablesFor="1" >- id="org.eclipse.gmf.graphdef.editor.part.GMFGraphInitDiagramFileActionID"> >+ id="org.eclipse.gmf.graphdef.editor.InitDiagramAction"> > </action> > </objectContribution> >+ </extension> >+ >+ <extension point="org.eclipse.ui.popupMenus"> >+ <?gmfgen generated="true"?> > <objectContribution > adaptable="false" > id="org.eclipse.gmf.graphdef.editor.ui.objectContribution.CanvasEditPart1" >@@ -213,16 +217,16 @@ > label="%tab.diagram"/> > <propertyTab > category="extra" >- id="property.tab.custom" >- label="%tab.custom"/> >+ id="property.tab.points" >+ label="%tab.points"/> >+ <propertyTab >+ category="extra" >+ id="property.tab.genStyles" >+ label="%tab.genStyles"/> > <propertyTab > category="extra" > id="property.tab.layout" > label="%tab.layout"/> >- <propertyTab >- category="extra" >- id="property.tab.points" >- label="%tab.points"/> > </propertyTabs> > </extension> > >@@ -250,10 +254,16 @@ > tab="property.tab.DiagramPropertySection"> > </propertySection> > <propertySection >- id="property.section.custom" >- tab="property.tab.custom" >+ id="property.section.points" >+ tab="property.tab.points" >+ filter="org.eclipse.gmf.graphdef.editor.part.PropertySectionFilters$PolylineFilter" >+ class="org.eclipse.gmf.graphdef.editor.sheet.PointsPropertySection"> >+ </propertySection> >+ <propertySection >+ id="property.section.genStyles" >+ tab="property.tab.genStyles" > filter="org.eclipse.gmf.graphdef.editor.part.PropertySectionFilters$ShapeFilter" >- class="org.eclipse.gmf.graphdef.editor.sheet.CustomPropertySection"> >+ class="org.eclipse.gmf.graphdef.editor.sheet.GeneratedStylesPropertySection"> > </propertySection> > <propertySection > id="property.section.layout" >@@ -261,12 +271,6 @@ > filter="org.eclipse.gmf.graphdef.editor.part.PropertySectionFilters$LayoutableFilter" > class="org.eclipse.gmf.graphdef.editor.sheet.LayoutPropertySection"> > </propertySection> >- <propertySection >- id="property.section.points" >- tab="property.tab.points" >- filter="org.eclipse.gmf.graphdef.editor.part.PropertySectionFilters$PolylineFilter" >- class="org.eclipse.gmf.graphdef.editor.sheet.PointsPropertySection"> >- </propertySection> > </propertySections> > </extension> > >@@ -498,11 +502,23 @@ > </propertyTester> > </extension> > >+ <extension point="org.eclipse.core.expressions.propertyTesters"> >+ <?gmfgen generated="true"?> >+ <propertyTester >+ id="org.eclipse.gmf.graphdef.editor.DomainModelElementTester" >+ type="org.eclipse.emf.ecore.EObject" >+ namespace="org.eclipse.gmf.graphdef.editor" >+ properties="isDomainModelElement" >+ class="org.eclipse.gmf.graphdef.editor.part.GMFGraphDomainModelElementTester"> >+ </propertyTester> >+ </extension> >+ > <extension point="org.eclipse.ui.navigator.viewer"> > <?gmfgen generated="true"?> > <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer"> > <includes> > <contentExtension pattern="org.eclipse.gmf.graphdef.editor.resourceContent"/> >+ <contentExtension pattern="org.eclipse.gmf.graphdef.editor.domainResourceContent"/> > <contentExtension pattern="org.eclipse.gmf.graphdef.editor.navigatorLinkHelper"/> > </includes> > </viewerContentBinding> >@@ -557,6 +573,33 @@ > </parentExpression> > </commonSorter> > </navigatorContent> >+ <navigatorContent >+ id="org.eclipse.gmf.graphdef.editor.domainResourceContent" >+ name="%domainNavigatorContentName" >+ priority="normal" >+ contentProvider="org.eclipse.gmf.graphdef.editor.navigator.GMFGraphDomainNavigatorContentProvider" >+ labelProvider="org.eclipse.gmf.graphdef.editor.navigator.GMFGraphDomainNavigatorLabelProvider" >+ icon="icons/obj16/GMFGraphDiagramFile.gif" >+ activeByDefault="true"> >+ <triggerPoints> >+ <or> >+ <and> >+ <instanceof value="org.eclipse.core.resources.IFile"/> >+ <test property="org.eclipse.core.resources.extension" value="gmfgraph"/> >+ </and> >+ <and> >+ <instanceof value="org.eclipse.emf.ecore.EObject"/> >+ <test property="org.eclipse.gmf.graphdef.editor.isDomainModelElement"/> >+ </and> >+ </or> >+ </triggerPoints> >+ <possibleChildren> >+ <and> >+ <instanceof value="org.eclipse.emf.ecore.EObject"/> >+ <test property="org.eclipse.gmf.graphdef.editor.isDomainModelElement"/> >+ </and> >+ </possibleChildren> >+ </navigatorContent> > <actionProvider > id="org.eclipse.gmf.graphdef.editor.navigatorActionProvider" > class="org.eclipse.gmf.graphdef.editor.navigator.GMFGraphNavigatorActionProvider"> >Index: messages.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/messages.properties,v >retrieving revision 1.2 >diff -u -r1.2 messages.properties >--- messages.properties 2 Mar 2007 15:39:20 -0000 1.2 >+++ messages.properties 20 Mar 2007 17:04:00 -0000 >@@ -1,5 +1,7 @@ > > # TODO: manually put keys and values >+DocumentProvider_isModifiable=DocumentProvider_isModifiable >+DocumentProvider_handleElementContentChanged=DocumentProvider_handleElementContentChanged > DiagramElements1Group_title=Diagram Elements > DiagramElements1Group_desc=Can visualize domain model elements > Figures2Group_title=Figures >@@ -44,5 +46,3 @@ > NavigatorGroupName_Polyline_3008_incominglinks=incoming links > NavigatorGroupName_DiagramElementFigure_4001_source=source > NavigatorGroupName_DiagramElementFigure_4001_target=target >-DocumentProvider_isModifiable=DocumentProvider_isModifiable >-DocumentProvider_handleElementContentChanged=DocumentProvider_handleElementContentChanged >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/plugin.properties,v >retrieving revision 1.3 >diff -u -r1.3 plugin.properties >--- plugin.properties 2 Mar 2007 15:39:20 -0000 1.3 >+++ plugin.properties 20 Mar 2007 17:04:00 -0000 >@@ -18,14 +18,15 @@ > > > navigatorContentName=*.gmfgraph_diagram diagram contents >+domainNavigatorContentName=*.gmfgraph model contents > > > # Property Sheet > tab.appearance=Appearance > tab.diagram=Rulers & Grid >-tab.custom=Styles >-tab.layout=Layout > tab.points=Points >+tab.genStyles=Styles >+tab.layout=Layout (Old) > > # Preferences > preference.page.title.org.eclipse.gmf.graphdef.diagram.general=GMFGraph Diagram >Index: src/org/eclipse/gmf/graphdef/editor/providers/ElementInitializers.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/ElementInitializers.java,v >retrieving revision 1.2 >diff -u -r1.2 ElementInitializers.java >--- src/org/eclipse/gmf/graphdef/editor/providers/ElementInitializers.java 2 Mar 2007 19:21:06 -0000 1.2 >+++ src/org/eclipse/gmf/graphdef/editor/providers/ElementInitializers.java 20 Mar 2007 17:04:00 -0000 >@@ -10,6 +10,9 @@ > */ > package org.eclipse.gmf.graphdef.editor.providers; > >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.gmf.graphdef.editor.part.GMFGraphDiagramEditorPlugin; > > /** > * @generated >Index: src/org/eclipse/gmf/graphdef/editor/sheet/GeneratedStylesPropertySection.java >=================================================================== >RCS file: src/org/eclipse/gmf/graphdef/editor/sheet/GeneratedStylesPropertySection.java >diff -N src/org/eclipse/gmf/graphdef/editor/sheet/GeneratedStylesPropertySection.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/gmf/graphdef/editor/sheet/GeneratedStylesPropertySection.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,889 @@ >+/* >+ * Copyright (c) 2006, 2007 Borland Software Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Borland Software Corporation - initial API and implementation >+ */ >+package org.eclipse.gmf.graphdef.editor.sheet; >+ >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.Iterator; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gmf.gmfgraph.LineKind; >+import org.eclipse.gmf.gmfgraph.RoundedRectangle; >+import org.eclipse.gmf.gmfgraph.Shape; >+import org.eclipse.gmf.graphdef.editor.part.GMFGraphDiagramEditorPlugin; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.StructuredSelection; >+import org.eclipse.swt.custom.CLabel; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.swt.widgets.Button; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Group; >+import org.eclipse.swt.widgets.Spinner; >+import org.eclipse.swt.widgets.Widget; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; >+ >+/** >+ * @generated >+ */ >+public class GeneratedStylesPropertySection extends AbstractCustomSectionParent { >+ >+ /** >+ * Modify/unwrap selection. >+ * @generated >+ */ >+ protected Object transformSelection(Object selected) { >+ if (selected instanceof EditPart) { >+ Object model = ((EditPart) selected).getModel(); >+ return model instanceof View ? ((View) model).getElement() : null; >+ } >+ if (selected instanceof View) { >+ return ((View) selected).getElement(); >+ } >+ if (selected instanceof IAdaptable) { >+ View view = (View) ((IAdaptable) selected).getAdapter(View.class); >+ if (view != null) { >+ return view.getElement(); >+ } >+ } >+ return selected; >+ } >+ >+ /** >+ * @generated >+ */ >+ private Collection mySavedSelection = new ArrayList(); >+ >+ /** >+ * @generated >+ */ >+ public Collection getSavedSelection() { >+ //StructuredSelection structured = (StructuredSelection) super.getSelection(); >+ //return structured.toList(); >+ return mySavedSelection; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setInput(IWorkbenchPart part, ISelection selection) { >+ if (selection.isEmpty() || false == selection instanceof StructuredSelection) { >+ super.setInput(part, selection); >+ return; >+ } >+ final StructuredSelection structuredSelection = ((StructuredSelection) selection); >+ ArrayList transformedSelection = new ArrayList(structuredSelection.size()); >+ for (Iterator it = structuredSelection.iterator(); it.hasNext();) { >+ Object r = transformSelection(it.next()); >+ if (r != null) { >+ transformedSelection.add(r); >+ } >+ } >+ mySavedSelection = transformedSelection; >+ super.setInput(part, new StructuredSelection(transformedSelection)); >+ } >+ >+ /** >+ * @generated >+ */ >+ private ModelHelper myModelHelper; >+ >+ /** >+ * @generated >+ */ >+ private Group myLineKindGroup; >+ >+ /** >+ * @generated >+ */ >+ private Button myLINE_SOLIDRadio; >+ >+ /** >+ * @generated >+ */ >+ private Image myLINE_SOLIDRadio_image; >+ >+ /** >+ * @generated >+ */ >+ private Button myLINE_DASHRadio; >+ >+ /** >+ * @generated >+ */ >+ private Image myLINE_DASHRadio_image; >+ >+ /** >+ * @generated >+ */ >+ private Button myLINE_DOTRadio; >+ >+ /** >+ * @generated >+ */ >+ private Image myLINE_DOTRadio_image; >+ >+ /** >+ * @generated >+ */ >+ private Button myLINE_DASHDOTRadio; >+ >+ /** >+ * @generated >+ */ >+ private Image myLINE_DASHDOTRadio_image; >+ >+ /** >+ * @generated >+ */ >+ private Button myDashDotDotLineStyleRadio; >+ >+ /** >+ * @generated >+ */ >+ private Image myDashDotDotLineStyleRadio_image; >+ >+ /** >+ * @generated >+ */ >+ private Button myCustomLineStyleRadio; >+ >+ /** >+ * @generated >+ */ >+ private Image myCustomLineStyleRadio_image; >+ >+ /** >+ * @generated >+ */ >+ private Group myLineWidthGroup; >+ >+ /** >+ * @generated >+ */ >+ private Spinner myLineWidthSpin; >+ >+ /** >+ * @generated >+ */ >+ private Group myMixStylesGroup; >+ >+ /** >+ * @generated >+ */ >+ private Button myFillCheckbox; >+ >+ /** >+ * @generated >+ */ >+ private Button myOutlineCheckbox; >+ >+ /** >+ * @generated >+ */ >+ private Button myXorFillCheckbox; >+ >+ /** >+ * @generated >+ */ >+ private Button myXorOutlineCheckbox; >+ >+ /** >+ * @generated >+ */ >+ private Group myCornerDimensionsGroup; >+ >+ /** >+ * @generated >+ */ >+ private CLabel myWidthLabel; >+ >+ /** >+ * @generated >+ */ >+ private Spinner myCornerWidthSpin; >+ >+ /** >+ * @generated >+ */ >+ private CLabel myHeightLabel; >+ >+ /** >+ * @generated >+ */ >+ private Spinner myCornerHeightSpin; >+ >+ /** >+ * @generated >+ */ >+ public void doCreateControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { >+ Composite mainComposite = createMainWidget(parent); >+ myLineKindGroup = createGroupWidget(mainComposite, "Line Style", null, null, null, null, true, true, false, false); >+ >+ myLINE_SOLIDRadio = createRadioButton(myLineKindGroup, "", null, null, null, null, true, true, false, false); >+ myLINE_SOLIDRadio_image = GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_solid.png").createImage(); >+ myLINE_SOLIDRadio.setImage(myLINE_SOLIDRadio_image); >+ >+ getListener().startListeningTo(myLINE_SOLIDRadio); >+ >+ myLINE_DASHRadio = createRadioButton(myLineKindGroup, "", null, myLINE_SOLIDRadio, null, null, false, true, false, false); >+ myLINE_DASHRadio_image = GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dash.png").createImage(); >+ myLINE_DASHRadio.setImage(myLINE_DASHRadio_image); >+ >+ getListener().startListeningTo(myLINE_DASHRadio); >+ >+ myLINE_DOTRadio = createRadioButton(myLineKindGroup, "", null, myLINE_DASHRadio, null, null, false, true, false, false); >+ myLINE_DOTRadio_image = GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dot.png").createImage(); >+ myLINE_DOTRadio.setImage(myLINE_DOTRadio_image); >+ >+ getListener().startListeningTo(myLINE_DOTRadio); >+ >+ myLINE_DASHDOTRadio = createRadioButton(myLineKindGroup, "", null, myLINE_DOTRadio, null, null, false, true, false, false); >+ myLINE_DASHDOTRadio_image = GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dashdot.png").createImage(); >+ myLINE_DASHDOTRadio.setImage(myLINE_DASHDOTRadio_image); >+ >+ getListener().startListeningTo(myLINE_DASHDOTRadio); >+ >+ myDashDotDotLineStyleRadio = createRadioButton(myLineKindGroup, "", null, myLINE_DASHDOTRadio, null, null, false, true, false, false); >+ myDashDotDotLineStyleRadio_image = GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_dashdotdot.png").createImage(); >+ myDashDotDotLineStyleRadio.setImage(myDashDotDotLineStyleRadio_image); >+ >+ getListener().startListeningTo(myDashDotDotLineStyleRadio); >+ >+ myCustomLineStyleRadio = createRadioButton(myLineKindGroup, "", null, myDashDotDotLineStyleRadio, null, null, false, true, false, false); >+ myCustomLineStyleRadio_image = GMFGraphDiagramEditorPlugin.findImageDescriptor("icons/line_custom.png").createImage(); >+ myCustomLineStyleRadio.setImage(myCustomLineStyleRadio_image); >+ >+ getListener().startListeningTo(myCustomLineStyleRadio); >+ >+ myLineWidthGroup = createGroupWidget(mainComposite, "Line Width", myLineKindGroup, null, null, null, true, false, false, false); >+ >+ myLineWidthSpin = createSpinnerWidget(myLineWidthGroup, "", 0, 999, 1, 100, null, null, null, null, true, true, false, false); >+ getListener().startListeningTo(myLineWidthSpin); >+ >+ myMixStylesGroup = createGroupWidget(mainComposite, "Mix Styles", null, myLineWidthGroup, null, null, false, true, false, false); >+ >+ myFillCheckbox = createCheckboxButton(myMixStylesGroup, getModelHelper().getNameMyFillCheckboxFromMetamodel(), null, null, null, null, true, true, false, false); >+ >+ getListener().startListeningTo(myFillCheckbox); >+ >+ myOutlineCheckbox = createCheckboxButton(myMixStylesGroup, getModelHelper().getNameMyOutlineCheckboxFromMetamodel(), null, myFillCheckbox, null, null, false, true, true, false); >+ >+ getListener().startListeningTo(myOutlineCheckbox); >+ >+ myXorFillCheckbox = createCheckboxButton(myMixStylesGroup, getModelHelper().getNameMyXorFillCheckboxFromMetamodel(), myFillCheckbox, null, null, null, true, false, false, true); >+ >+ getListener().startListeningTo(myXorFillCheckbox); >+ >+ myXorOutlineCheckbox = createCheckboxButton(myMixStylesGroup, getModelHelper().getNameMyXorOutlineCheckboxFromMetamodel(), myOutlineCheckbox, null, null, null, true, false, true, true); >+ >+ getListener().startListeningTo(myXorOutlineCheckbox); >+ >+ myCornerDimensionsGroup = createGroupWidget(mainComposite, "Corner Dimensions", null, myMixStylesGroup, null, null, false, true, false, false); >+ >+ myWidthLabel = createLabelWidget(myCornerDimensionsGroup, "Width", null, null, null, null, true, true, false, false); >+ >+ myCornerWidthSpin = createSpinnerWidget(myCornerDimensionsGroup, "", 0, 999, 1, 100, myWidthLabel, null, null, null, true, false, false, false); >+ getListener().startListeningTo(myCornerWidthSpin); >+ >+ myHeightLabel = createLabelWidget(myCornerDimensionsGroup, "Height", myCornerWidthSpin, null, null, null, true, false, false, false); >+ >+ myCornerHeightSpin = createSpinnerWidget(myCornerDimensionsGroup, "", 0, 999, 1, 100, myHeightLabel, null, null, null, true, false, false, false); >+ getListener().startListeningTo(myCornerHeightSpin); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public void doDispose() { >+ getListener().stopListeningTo(myLINE_SOLIDRadio); >+ >+ myLINE_SOLIDRadio_image.dispose(); >+ myLINE_SOLIDRadio_image = null; >+ >+ getListener().stopListeningTo(myLINE_DASHRadio); >+ >+ myLINE_DASHRadio_image.dispose(); >+ myLINE_DASHRadio_image = null; >+ >+ getListener().stopListeningTo(myLINE_DOTRadio); >+ >+ myLINE_DOTRadio_image.dispose(); >+ myLINE_DOTRadio_image = null; >+ >+ getListener().stopListeningTo(myLINE_DASHDOTRadio); >+ >+ myLINE_DASHDOTRadio_image.dispose(); >+ myLINE_DASHDOTRadio_image = null; >+ >+ getListener().stopListeningTo(myDashDotDotLineStyleRadio); >+ >+ myDashDotDotLineStyleRadio_image.dispose(); >+ myDashDotDotLineStyleRadio_image = null; >+ >+ getListener().stopListeningTo(myCustomLineStyleRadio); >+ >+ myCustomLineStyleRadio_image.dispose(); >+ myCustomLineStyleRadio_image = null; >+ >+ getListener().stopListeningTo(myLineWidthSpin); >+ >+ getListener().stopListeningTo(myFillCheckbox); >+ >+ getListener().stopListeningTo(myOutlineCheckbox); >+ >+ getListener().stopListeningTo(myXorFillCheckbox); >+ >+ getListener().stopListeningTo(myXorOutlineCheckbox); >+ >+ getListener().stopListeningTo(myCornerWidthSpin); >+ >+ getListener().stopListeningTo(myCornerHeightSpin); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public void refresh() { >+ getListener().startNonUserChange(); >+ for (Iterator it = getSavedSelection().iterator(); it.hasNext();) { >+ Object next = it.next(); >+ if (next instanceof Shape) { >+ final Shape target = (Shape) next; >+ executeAsReadAction(new Runnable() { >+ >+ public void run() { >+ updateFromModel(target); >+ } >+ }); >+ } >+ } >+ getListener().finishNonUserChange(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void updateFromModel(Shape target) { >+ >+ { >+ >+ { >+ myLINE_SOLIDRadio.setSelection(getModelHelper().getValueForMyLINE_SOLIDRadio(target)); >+ } >+ >+ { >+ myLINE_DASHRadio.setSelection(getModelHelper().getValueForMyLINE_DASHRadio(target)); >+ } >+ >+ { >+ myLINE_DOTRadio.setSelection(getModelHelper().getValueForMyLINE_DOTRadio(target)); >+ } >+ >+ { >+ myLINE_DASHDOTRadio.setSelection(getModelHelper().getValueForMyLINE_DASHDOTRadio(target)); >+ } >+ >+ { >+ myDashDotDotLineStyleRadio.setSelection(getModelHelper().getValueForMyDashDotDotLineStyleRadio(target)); >+ } >+ >+ { >+ myCustomLineStyleRadio.setSelection(getModelHelper().getValueForMyCustomLineStyleRadio(target)); >+ } >+ } >+ >+ { >+ >+ { >+ myLineWidthSpin.setSelection(getModelHelper().getValueForMyLineWidthSpin(target)); >+ } >+ } >+ >+ { >+ >+ { >+ myFillCheckbox.setSelection(getModelHelper().getValueForMyFillCheckbox(target)); >+ } >+ >+ { >+ myOutlineCheckbox.setSelection(getModelHelper().getValueForMyOutlineCheckbox(target)); >+ } >+ >+ { >+ myXorFillCheckbox.setSelection(getModelHelper().getValueForMyXorFillCheckbox(target)); >+ } >+ >+ { >+ myXorOutlineCheckbox.setSelection(getModelHelper().getValueForMyXorOutlineCheckbox(target)); >+ } >+ } >+ boolean isMyCornerDimensionsGroupVisible = getModelHelper().isVisibleMyCornerDimensionsGroup(target); >+ myCornerDimensionsGroup.setVisible(isMyCornerDimensionsGroupVisible); >+ if (isMyCornerDimensionsGroupVisible) { >+ >+ { >+ //myWidthLabel.setText("Width"); >+ } >+ >+ { >+ myCornerWidthSpin.setSelection(getModelHelper().getValueForMyCornerWidthSpin(target)); >+ } >+ >+ { >+ //myHeightLabel.setText("Height"); >+ } >+ >+ { >+ myCornerHeightSpin.setSelection(getModelHelper().getValueForMyCornerHeightSpin(target)); >+ } >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ public ModelUpdater createModelUpdater() { >+ return new ModelUpdater() { >+ >+ public void applyChangesFrom(Widget widget, int kind) { >+ GeneratedStylesPropertySection.this.applyChangesFrom(widget, kind); >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void applyChangesFrom(final Widget widget, int kind) { >+ String commandName = "Modifying model with ui data from " + widget.toString(); >+ ArrayList commands = new ArrayList(getSavedSelection().size()); >+ for (Iterator it = getSavedSelection().iterator(); it.hasNext();) { >+ Object next = it.next(); >+ if (next instanceof Shape) { >+ final Shape target = (Shape) next; >+ commands.add(createCommand(commandName, target, getModelModifierFor(target, widget, kind))); >+ } >+ } >+ executeAsCompositeCommand(commandName, commands); >+ //refresh(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public Runnable getModelModifierFor(final Shape target, final Widget widget, int kind) { >+ if (widget == myLINE_SOLIDRadio && myLINE_SOLIDRadio.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myLINE_SOLIDRadio.getSelection(); >+ if (value) { >+ getModelHelper().setValueForMyLINE_SOLIDRadio(target, value); >+ } >+ } >+ }; >+ } >+ >+ if (widget == myLINE_DASHRadio && myLINE_DASHRadio.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myLINE_DASHRadio.getSelection(); >+ if (value) { >+ getModelHelper().setValueForMyLINE_DASHRadio(target, value); >+ } >+ } >+ }; >+ } >+ >+ if (widget == myLINE_DOTRadio && myLINE_DOTRadio.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myLINE_DOTRadio.getSelection(); >+ if (value) { >+ getModelHelper().setValueForMyLINE_DOTRadio(target, value); >+ } >+ } >+ }; >+ } >+ >+ if (widget == myLINE_DASHDOTRadio && myLINE_DASHDOTRadio.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myLINE_DASHDOTRadio.getSelection(); >+ if (value) { >+ getModelHelper().setValueForMyLINE_DASHDOTRadio(target, value); >+ } >+ } >+ }; >+ } >+ >+ if (widget == myDashDotDotLineStyleRadio && myDashDotDotLineStyleRadio.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myDashDotDotLineStyleRadio.getSelection(); >+ if (value) { >+ getModelHelper().setValueForMyDashDotDotLineStyleRadio(target, value); >+ } >+ } >+ }; >+ } >+ >+ if (widget == myCustomLineStyleRadio && myCustomLineStyleRadio.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myCustomLineStyleRadio.getSelection(); >+ if (value) { >+ getModelHelper().setValueForMyCustomLineStyleRadio(target, value); >+ } >+ } >+ }; >+ } >+ >+ if (widget == myLineWidthSpin && myLineWidthSpin.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final int value = myLineWidthSpin.getSelection(); >+ getModelHelper().setValueForMyLineWidthSpin(target, value); >+ } >+ }; >+ } >+ >+ if (widget == myFillCheckbox && myFillCheckbox.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myFillCheckbox.getSelection(); >+ getModelHelper().setValueForMyFillCheckbox(target, value); >+ } >+ }; >+ } >+ >+ if (widget == myOutlineCheckbox && myOutlineCheckbox.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myOutlineCheckbox.getSelection(); >+ getModelHelper().setValueForMyOutlineCheckbox(target, value); >+ } >+ }; >+ } >+ >+ if (widget == myXorFillCheckbox && myXorFillCheckbox.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myXorFillCheckbox.getSelection(); >+ getModelHelper().setValueForMyXorFillCheckbox(target, value); >+ } >+ }; >+ } >+ >+ if (widget == myXorOutlineCheckbox && myXorOutlineCheckbox.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final boolean value = myXorOutlineCheckbox.getSelection(); >+ getModelHelper().setValueForMyXorOutlineCheckbox(target, value); >+ } >+ }; >+ } >+ >+ if (widget == myCornerWidthSpin && myCornerWidthSpin.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final int value = myCornerWidthSpin.getSelection(); >+ getModelHelper().setValueForMyCornerWidthSpin(target, value); >+ } >+ }; >+ } >+ >+ if (widget == myCornerHeightSpin && myCornerHeightSpin.isVisible()) { >+ return new Runnable() { >+ >+ public void run() { >+ final int value = myCornerHeightSpin.getSelection(); >+ getModelHelper().setValueForMyCornerHeightSpin(target, value); >+ } >+ }; >+ } >+ >+ // default: >+ return new Runnable() { >+ >+ public void run() { >+ // does nothing >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ModelHelper getModelHelper() { >+ if (myModelHelper == null) { >+ myModelHelper = new ModelHelper(); >+ } >+ return myModelHelper; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static final class ModelHelper { >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyLINE_SOLIDRadio(Shape shape) { >+ return shape.getLineKind().getValue() == LineKind.LINE_SOLID; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyLINE_SOLIDRadio(Shape shape, boolean value) { >+ shape.setLineKind(LineKind.LINE_SOLID_LITERAL); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyLINE_DASHRadio(Shape shape) { >+ return shape.getLineKind().getValue() == LineKind.LINE_DASH; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyLINE_DASHRadio(Shape shape, boolean value) { >+ shape.setLineKind(LineKind.LINE_DASH_LITERAL); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyLINE_DOTRadio(Shape shape) { >+ return shape.getLineKind().getValue() == LineKind.LINE_DOT; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyLINE_DOTRadio(Shape shape, boolean value) { >+ shape.setLineKind(LineKind.LINE_DOT_LITERAL); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyLINE_DASHDOTRadio(Shape shape) { >+ return shape.getLineKind().getValue() == LineKind.LINE_DASHDOT; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyLINE_DASHDOTRadio(Shape shape, boolean value) { >+ shape.setLineKind(LineKind.LINE_DASHDOT_LITERAL); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyDashDotDotLineStyleRadio(Shape shape) { >+ return shape.getLineKind().getValue() == LineKind.LINE_DASHDOTDOT; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyDashDotDotLineStyleRadio(Shape shape, boolean value) { >+ shape.setLineKind(LineKind.LINE_DASHDOTDOT_LITERAL); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyCustomLineStyleRadio(Shape shape) { >+ return shape.getLineKind().getValue() == LineKind.LINE_CUSTOM; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyCustomLineStyleRadio(Shape shape, boolean value) { >+ shape.setLineKind(LineKind.LINE_CUSTOM_LITERAL); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public int getValueForMyLineWidthSpin(Shape shape) { >+ int value = shape.getLineWidth(); >+ return value; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyLineWidthSpin(Shape shape, int value) { >+ shape.setLineWidth(value); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyFillCheckbox(Shape shape) { >+ return shape.isFill(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyFillCheckbox(Shape shape, boolean value) { >+ shape.setFill(value); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getNameMyFillCheckboxFromMetamodel() { >+ return "Fill"; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyOutlineCheckbox(Shape shape) { >+ return shape.isOutline(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyOutlineCheckbox(Shape shape, boolean value) { >+ shape.setOutline(value); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getNameMyOutlineCheckboxFromMetamodel() { >+ return "Outline"; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyXorFillCheckbox(Shape shape) { >+ return shape.isXorFill(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyXorFillCheckbox(Shape shape, boolean value) { >+ shape.setXorFill(value); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getNameMyXorFillCheckboxFromMetamodel() { >+ return "XorFill"; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean getValueForMyXorOutlineCheckbox(Shape shape) { >+ return shape.isXorOutline(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyXorOutlineCheckbox(Shape shape, boolean value) { >+ shape.setXorOutline(value); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getNameMyXorOutlineCheckboxFromMetamodel() { >+ return "XorOutline"; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean isVisibleMyCornerDimensionsGroup(Shape targetVar) { >+ return targetVar instanceof RoundedRectangle; >+ } >+ >+ /** >+ * @generated >+ */ >+ public int getValueForMyCornerWidthSpin(Shape shape) { >+ int value = ((RoundedRectangle) shape).getCornerWidth(); >+ return value; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyCornerWidthSpin(Shape shape, int value) { >+ ((RoundedRectangle) shape).setCornerWidth(value); >+ >+ } >+ >+ /** >+ * @generated >+ */ >+ public int getValueForMyCornerHeightSpin(Shape shape) { >+ int value = ((RoundedRectangle) shape).getCornerHeight(); >+ return value; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setValueForMyCornerHeightSpin(Shape shape, int value) { >+ ((RoundedRectangle) shape).setCornerHeight(value); >+ >+ } >+ >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 173499
:
60157
|
61427
|
61428
|
62857
|
62858
|
62859