JBoss Tools SVN: r10092 - trunk/common/plugins.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-05 01:09:19 -0400 (Fri, 05 Sep 2008)
New Revision: 10092
Removed:
trunk/common/plugins/org.jboss.tools.common.el/
Log:
17 years, 7 months
JBoss Tools SVN: r10091 - trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-05 00:56:29 -0400 (Fri, 05 Sep 2008)
New Revision: 10091
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF
Log:
el plug-ins refactoring
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF 2008-09-05 04:53:44 UTC (rev 10090)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF 2008-09-05 04:56:29 UTC (rev 10091)
@@ -4,8 +4,9 @@
Bundle-Name: EL UI Plug-in
Bundle-SymbolicName: org.jboss.tools.common.el.ui
Bundle-Version: 1.0.0
-Provide-Package: org.jboss.tools.common.el,
+Provide-Package: org.jboss.tools.common.el,
org.jboss.tools.common.el.global,
+ org.jboss.tools.common.el.ui,
org.jboss.tools.common.el.vpe
Bundle-Activator: org.jboss.tools.common.el.ui.Activator
Require-Bundle: org.eclipse.ui,
17 years, 7 months
JBoss Tools SVN: r10090 - trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-05 00:53:44 -0400 (Fri, 05 Sep 2008)
New Revision: 10090
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF
Log:
el plug-ins refactoring
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF 2008-09-05 04:44:56 UTC (rev 10089)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF 2008-09-05 04:53:44 UTC (rev 10090)
@@ -1,8 +1,12 @@
Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Ui Plug-in
+Eclipse-LazyStart: true
+Bundle-Localization: plugin
+Bundle-Name: EL UI Plug-in
Bundle-SymbolicName: org.jboss.tools.common.el.ui
Bundle-Version: 1.0.0
+Provide-Package: org.jboss.tools.common.el,
+ org.jboss.tools.common.el.global,
+ org.jboss.tools.common.el.vpe
Bundle-Activator: org.jboss.tools.common.el.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@@ -10,6 +14,3 @@
org.jboss.tools.common.resref.ui;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.4.0",
org.jboss.tools.common.model.ui;bundle-version="2.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.jboss.tools.common.el.ui
17 years, 7 months
JBoss Tools SVN: r10089 - trunk/vpe/plugins/org.jboss.tools.vpe/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-05 00:44:56 -0400 (Fri, 05 Sep 2008)
New Revision: 10089
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
Log:
el plug-ins refactoring
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-09-05 01:07:20 UTC (rev 10088)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-09-05 04:44:56 UTC (rev 10089)
@@ -72,9 +72,9 @@
org.mozilla.xpcom,
org.eclipse.draw2d,
org.jboss.tools.jst.web,
- org.jboss.tools.vpe.resref;bundle-version="2.0.0",
- org.jboss.tools.common.el.core;bundle-version="2.0.0",
- org.jboss.tools.common.el.ui;bundle-version="1.0.0",
- org.jboss.tools.common.resref.ui;bundle-version="1.0.0"
+ org.jboss.tools.vpe.resref,
+ org.jboss.tools.common.el.core,
+ org.jboss.tools.common.el.ui,
+ org.jboss.tools.common.resref.ui
Bundle-Version: 2.1.0
17 years, 7 months
JBoss Tools SVN: r10088 - in workspace/dart/plugins/org.jboss.tools.smooks.ui: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-04 21:07:20 -0400 (Thu, 04 Sep 2008)
New Revision: 10088
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml
Log:
add property sheet page
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-09-05 01:07:04 UTC (rev 10087)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-09-05 01:07:20 UTC (rev 10088)
@@ -20,7 +20,8 @@
org.eclipse.emf,
org.eclipse.emf.edit,
org.jboss.tools.smooks.model.edit,
- org.jboss.tools.smooks.graphicalInfo
+ org.jboss.tools.smooks.graphicalInfo,
+ org.eclipse.ui.views.properties.tabbed
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-09-05 01:07:04 UTC (rev 10087)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-09-05 01:07:20 UTC (rev 10088)
@@ -22,4 +22,38 @@
uri="http://www.jboss.org/tools/smooks">
</package>
</extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.jboss.tools.smooks.ui.editors.SmooksFormEditor">
+ <propertySection
+ class="org.jboss.tools.smooks.ui.ConnectionPropertySection"
+ id="org.jboss.tools.smooks.ui.connection.propertyTab.Section"
+ tab="org.jboss.tools.smooks.ui.connection.propertyTab">
+ <input
+ type="org.jboss.tools.smooks.ui.gef.model.LineConnectionModel">
+ </input>
+ </propertySection>
+ </propertySections>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.jboss.tools.smooks.ui.editors.SmooksFormEditor"
+ typeMapper="org.jboss.tools.smooks.ui.SmooksGraphPropertyTypeMapper">
+ <propertyCategory
+ category="connection"></propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.jboss.tools.smooks.ui.editors.SmooksFormEditor">
+ <propertyTab
+ category="connection"
+ id="org.jboss.tools.smooks.ui.connection.propertyTab"
+ label="Mapping Properties">
+ </propertyTab>
+ </propertyTabs>
+ </extension>
</plugin>
17 years, 7 months
JBoss Tools SVN: r10087 - workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-04 21:07:04 -0400 (Thu, 04 Sep 2008)
New Revision: 10087
Added:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java
Log:
add new property model on connection model
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java 2008-09-05 01:06:35 UTC (rev 10086)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java 2008-09-05 01:07:04 UTC (rev 10087)
@@ -1,9 +1,12 @@
package org.jboss.tools.smooks.ui.gef.model;
+import java.util.ArrayList;
+import java.util.List;
+
public class AbstractStructuredDataConnectionModel {
- private IConnectableModel source;
- private IConnectableModel target;
-
+ protected IConnectableModel source;
+ protected IConnectableModel target;
+ protected List<PropertyModel> properties = new ArrayList<PropertyModel>();
public AbstractStructuredDataConnectionModel(IConnectableModel source,
IConnectableModel target) {
this.setSource(source);
@@ -57,4 +60,12 @@
public void setTarget(IConnectableModel target) {
this.target = target;
}
+
+ public List<PropertyModel> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(List<PropertyModel> properties) {
+ this.properties = properties;
+ }
}
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java 2008-09-05 01:07:04 UTC (rev 10087)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.ui.gef.model;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 4, 2008
+ */
+public class PropertyModel extends AbstractStructuredDataModel {
+ private String name;
+ private String value;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 7 months
JBoss Tools SVN: r10086 - workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-04 21:06:35 -0400 (Thu, 04 Sep 2008)
New Revision: 10086
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
Log:
add property sheet page
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-09-05 01:06:05 UTC (rev 10085)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-09-05 01:06:35 UTC (rev 10086)
@@ -12,22 +12,28 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
/**
* @author Dart Peng
* @Date Jul 28, 2008
*/
-public class SmooksFormEditor extends FormEditor {
+public class SmooksFormEditor extends FormEditor implements
+ ITabbedPropertySheetPageContributor {
SmooksGraphicalFormPage graphicalPage = null;
+ private TabbedPropertySheetPage tabbedPropertySheetPage;
+ public static final String EDITOR_ID = "org.jboss.tools.smooks.ui.editors.SmooksFormEditor";
+
@Override
protected void addPages() {
- graphicalPage = new SmooksGraphicalFormPage(this,"graph" , "Mapping");
+ graphicalPage = new SmooksGraphicalFormPage(this, "graph", "Mapping");
try {
int index = this.addPage(this.graphicalPage);
this.setPageText(index, "Graph");
-
+
} catch (PartInitException e) {
e.printStackTrace();
}
@@ -38,11 +44,10 @@
graphicalPage.doSave(monitor);
}
-
@Override
public void doSaveAs() {
// TODO Auto-generated method stub
-
+
}
@Override
@@ -51,5 +56,21 @@
return false;
}
-
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySheetPage.class){
+ tabbedPropertySheetPage = new TabbedPropertySheetPage(this);
+ return tabbedPropertySheetPage;
+ }
+ return super.getAdapter(adapter);
+ }
+
+ public String getContributorId() {
+ return getSite().getId();
+ }
+
+ public void setTabbedPropertySheetPage(
+ TabbedPropertySheetPage tabbedPropertySheetPage) {
+ this.tabbedPropertySheetPage = tabbedPropertySheetPage;
+ }
+
}
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-09-05 01:06:05 UTC (rev 10085)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-09-05 01:06:35 UTC (rev 10086)
@@ -51,7 +51,9 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
@@ -86,6 +88,7 @@
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.jboss.tools.smooks.analyzer.AnalyzerFactory;
import org.jboss.tools.smooks.analyzer.IAnalyzer;
import org.jboss.tools.smooks.analyzer.MappingModel;
@@ -122,7 +125,7 @@
* @Date Jul 28, 2008
*/
public class SmooksGraphicalFormPage extends FormPage implements
- ISelectionChangedListener {
+ ISelectionChangedListener, ISelectionProvider {
private static final String REFERENCE_MODEL = "__reference_model";
protected SmooksConfigurationFileGenerateContext smooksConfigurationFileGenerateContext;
protected IViewerInitor sourceViewerInitor;
@@ -146,6 +149,26 @@
protected boolean commandStackChanged = false;
protected ActionRegistry actionRegistry;
+ private List selectionChangeListener = new ArrayList();
+ private ISelection selection;
+
+ public ISelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(ISelection selection) {
+ if (this.selection == selection)
+ return;
+ this.selection = selection;
+ SelectionChangedEvent event = new SelectionChangedEvent(this, selection);
+ for (Iterator iterator = selectionChangeListener.iterator(); iterator
+ .hasNext();) {
+ ISelectionChangedListener listener = (ISelectionChangedListener) iterator
+ .next();
+ listener.selectionChanged(event);
+ }
+ }
+
public SmooksGraphicalFormPage(FormEditor editor, String id, String title) {
super(editor, id, title);
editDomain = new DefaultEditDomain(this);
@@ -217,6 +240,8 @@
new TreePaintControlListener());
sourceViewer.getTree().addListener(SWT.PaintItem,
new TreeItemPaintListener());
+
+ sourceViewer.addSelectionChangedListener(this);
composite1.setLayoutData(gd);
composite1.setBackground(GraphicsConstants.groupBorderColor);
}
@@ -257,6 +282,7 @@
new TreePaintControlListener());
targetViewer.getTree().addListener(SWT.PaintItem,
new TreeItemPaintListener());
+ targetViewer.addSelectionChangedListener(this);
composite3.setBackground(GraphicsConstants.groupBorderColor);
}
@@ -321,7 +347,7 @@
this.hookGraphicalViewer();
this.initGraphicalViewer();
- getSite().getSelectionProvider().addSelectionChangedListener(this);
+ getSite().setSelectionProvider(this);
}
protected SmooksFileBuilder createSmooksFileBulder() {
@@ -539,7 +565,7 @@
protected void hookGraphicalViewer() {
getSelectionSynchronizer().addViewer(getGraphicalViewer());
- getSite().setSelectionProvider(getGraphicalViewer());
+ this.getGraphicalViewer().addSelectionChangedListener(this);
getGraphicalViewer().addDropTargetListener(
new MappingPanelDropTargetListener(this.getGraphicalViewer()));
}
@@ -911,6 +937,7 @@
public void selectionChanged(SelectionChangedEvent event) {
updateSelectionActions();
+ this.setSelection(event.getSelection());
}
protected void updateSelectionActions() {
@@ -947,4 +974,13 @@
}
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ this.selectionChangeListener.add(listener);
+ }
+
+ public void removeSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ this.selectionChangeListener.remove(listener);
+ }
+
}
17 years, 7 months
JBoss Tools SVN: r10085 - workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-04 21:06:05 -0400 (Thu, 04 Sep 2008)
New Revision: 10085
Added:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ConnectionPropertySection.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksGraphPropertyTypeMapper.java
Log:
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ConnectionPropertySection.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ConnectionPropertySection.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ConnectionPropertySection.java 2008-09-05 01:06:05 UTC (rev 10085)
@@ -0,0 +1,248 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.ui;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataConnectionModel;
+import org.jboss.tools.smooks.ui.gef.model.PropertyModel;
+
+/**
+ *
+ * @author Dart Peng<br>
+ * Date : Sep 4, 2008
+ */
+public class ConnectionPropertySection extends AbstractPropertySection {
+
+ private TableViewer tableViewer;
+
+ /**
+ *
+ */
+ public ConnectionPropertySection() {
+ }
+
+ @Override
+ public void createControls(Composite parent,
+ TabbedPropertySheetPage tabbedPropertySheetPage) {
+ super.createControls(parent, tabbedPropertySheetPage);
+ TabbedPropertySheetWidgetFactory factory = this.getWidgetFactory();
+
+ Section section = factory.createSection(parent, Section.TITLE_BAR);
+ section.setText("Mapping Properties");
+
+ Composite mainComposite = factory.createComposite(section);
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 2;
+ mainComposite.setLayout(gridLayout);
+ tableViewer = new TableViewer(mainComposite);
+ tableViewer.setColumnProperties(new String[] { "name", "value" });
+ tableViewer.setCellEditors(new CellEditor[] { new TextCellEditor(tableViewer.getTable()),
+ new TextCellEditor(tableViewer.getTable()) });
+ tableViewer.setCellModifier(new ICellModifier() {
+
+ public boolean canModify(Object element, String property) {
+ // TODO Auto-generated method stub
+ return true;
+ }
+
+ public Object getValue(Object element, String property) {
+ if (element instanceof PropertyModel) {
+ if (property.equals("name"))
+ return ((PropertyModel) element).getName();
+ if (property.equals("value"))
+ return ((PropertyModel) element).getValue();
+ }
+ return element;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ });
+ tableViewer.getTable().setHeaderVisible(true);
+ tableViewer.setContentProvider(new IStructuredContentProvider() {
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof AbstractStructuredDataConnectionModel) {
+ return ((AbstractStructuredDataConnectionModel) inputElement)
+ .getProperties().toArray();
+ }
+ return new Object[] {};
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput,
+ Object newInput) {
+
+ }
+
+ });
+ // tableViewer.setLabelProvider(new PropertyLabelProvider());
+
+ // TableViewerColumn blankColumn = new TableViewerColumn(tableViewer,
+ // SWT.NONE);
+ // blankColumn.getColumn().setWidth(100);
+ // blankColumn.getColumn().setText(" ");
+ TableViewerColumn nameColumn = new TableViewerColumn(tableViewer,
+ SWT.NONE);
+ nameColumn.setLabelProvider(new CellLabelProvider() {
+
+ public void update(ViewerCell cell) {
+ Object obj = cell.getElement();
+ if (obj instanceof PropertyModel) {
+ cell.setText(((PropertyModel) obj).getName());
+ }
+ }
+
+ });
+ nameColumn.getColumn().setWidth(100);
+ nameColumn.getColumn().setText("Name");
+ TableViewerColumn valueColumn = new TableViewerColumn(tableViewer,
+ SWT.NONE);
+ valueColumn.getColumn().setWidth(100);
+ valueColumn.getColumn().setText("Value");
+ valueColumn.setLabelProvider(new CellLabelProvider() {
+
+ public void update(ViewerCell cell) {
+ Object obj = cell.getElement();
+ if (obj instanceof PropertyModel) {
+ cell.setText(((PropertyModel) obj).getValue());
+ }
+ }
+
+ });
+ section.setClient(mainComposite);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ tableViewer.getTable().setLayoutData(gd);
+
+ Composite buttonComposite = factory.createComposite(mainComposite);
+ gd = new GridData(GridData.FILL_VERTICAL);
+ buttonComposite.setLayoutData(gd);
+ GridLayout gl = new GridLayout();
+ buttonComposite.setLayout(gl);
+
+ Button button1 = factory.createButton(buttonComposite, "New ",
+ SWT.NONE);
+ button1.addSelectionListener(new SelectionListener() {
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ PropertyModel model = new PropertyModel();
+ model.setName("property");
+ model.setValue("value");
+
+ Object editPart = ((IStructuredSelection) getSelection())
+ .getFirstElement();
+ if (editPart instanceof EditPart) {
+ Object m = ((EditPart) editPart).getModel();
+ if (m instanceof AbstractStructuredDataConnectionModel) {
+ ((AbstractStructuredDataConnectionModel) m)
+ .getProperties().add(model);
+ refresh();
+ StructuredSelection selection = new StructuredSelection(
+ model);
+ tableViewer.setSelection(selection);
+ }
+ }
+ }
+
+ });
+ gd = new GridData(GridData.FILL_VERTICAL);
+ button1.setLayoutData(gd);
+
+ Button button2 = factory.createButton(buttonComposite, "Delete ",
+ SWT.NONE);
+ gd = new GridData(GridData.FILL_VERTICAL);
+ button2.setLayoutData(gd);
+
+ // Button button3 = factory.createButton(buttonComposite, "New ",
+ // SWT.NONE);
+ // gd = new GridData(GridData.FILL_VERTICAL);
+ // button3.setLayoutData(gd);
+
+ factory.paintBordersFor(parent);
+ }
+
+ @Override
+ public void refresh() {
+ super.refresh();
+ IStructuredSelection selection = (IStructuredSelection) this
+ .getSelection();
+ Object obj = selection.getFirstElement();
+ if (obj == null)
+ return;
+ if (obj instanceof EditPart) {
+ Object model = ((EditPart) obj).getModel();
+ this.tableViewer.setInput(model);
+ }
+ }
+
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ }
+
+ private class PropertyLabelProvider extends LabelProvider implements
+ ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ switch (columnIndex) {
+ case 0:
+ if (element instanceof PropertyModel) {
+ return ((PropertyModel) element).getName();
+ }
+ return element.toString();
+
+ case 1:
+ if (element instanceof PropertyModel) {
+ return ((PropertyModel) element).getValue();
+ }
+ return element.toString();
+ }
+ return element.toString();
+ }
+
+ }
+
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ConnectionPropertySection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksGraphPropertyTypeMapper.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksGraphPropertyTypeMapper.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksGraphPropertyTypeMapper.java 2008-09-05 01:06:05 UTC (rev 10085)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.ui;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.views.properties.tabbed.ITypeMapper;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 4, 2008
+ */
+public class SmooksGraphPropertyTypeMapper implements ITypeMapper {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.tabbed.ITypeMapper#mapType(java.lang.Object)
+ */
+ public Class mapType(Object object) {
+ if (object instanceof EditPart) {
+ Object model = ((EditPart) object).getModel();
+ if (model != null)
+ return model.getClass();
+ }
+ return null;
+ }
+
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksGraphPropertyTypeMapper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 7 months
JBoss Tools SVN: r10084 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-04 20:01:40 -0400 (Thu, 04 Sep 2008)
New Revision: 10084
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
Log:
new plug-ins to build are added to the build
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-09-04 23:57:19 UTC (rev 10083)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-09-05 00:01:40 UTC (rev 10084)
@@ -87,5 +87,4 @@
org.eclipse.debug.ui,
org.jboss.tools.jsf.vpe.jsf
Bundle-Version: 2.0.0
-Import-Package: org.jboss.tools.vpe.editor.css
17 years, 7 months
JBoss Tools SVN: r10083 - trunk/vpe/plugins/org.jboss.tools.vpe/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-04 19:57:19 -0400 (Thu, 04 Sep 2008)
New Revision: 10083
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
Log:
new plug-ins to build are added to the build
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-09-04 23:47:09 UTC (rev 10082)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-09-04 23:57:19 UTC (rev 10083)
@@ -12,7 +12,6 @@
org.jboss.tools.vpe.editor,
org.jboss.tools.vpe.editor.bundle,
org.jboss.tools.vpe.editor.context,
- org.jboss.tools.vpe.editor.css,
org.jboss.tools.vpe.editor.dnd,
org.jboss.tools.vpe.editor.dnd.composite,
org.jboss.tools.vpe.editor.dnd.context,
17 years, 7 months