JBoss Tools SVN: r10348 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: ui/editors and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-18 03:50:01 -0400 (Thu, 18 Sep 2008)
New Revision: 10348
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelPackage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java
Log:
change the NormalResourceConfigPage display GUI
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java 2008-09-18 07:48:55 UTC (rev 10347)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java 2008-09-18 07:50:01 UTC (rev 10348)
@@ -32,7 +32,7 @@
public NormalSmooksModelPackage buildNormalSmooksModelPackage(
SmooksResourceListType list) {
- NormalSmooksModelPackage modelPackage = new NormalSmooksModelPackage();
+ NormalSmooksModelPackage modelPackage = new NormalSmooksModelPackage(list);
if (list != null) {
List resourceConfigList = list.getAbstractResourceConfig();
for (Iterator iterator = resourceConfigList.iterator(); iterator
@@ -63,7 +63,8 @@
return false;
String selector = config.getSelector();
if (selector != null) {
- return SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector.trim());
+ return SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector
+ .trim());
}
return false;
}
@@ -74,8 +75,8 @@
ResourceType resource = config.getResource();
if (resource != null) {
String r = resource.getValue();
- if(r != null)
- return SmooksModelConstants.DATE_DECODER.equals(r.trim());
+ if (r != null)
+ return SmooksModelConstants.DATE_DECODER.equals(r.trim());
}
return false;
}
@@ -86,8 +87,9 @@
ResourceType resource = config.getResource();
if (resource != null) {
String resourceString = resource.getValue();
- if(resourceString != null)
- return SmooksModelConstants.BEAN_POPULATOR.equals(resourceString.trim());
+ if (resourceString != null)
+ return SmooksModelConstants.BEAN_POPULATOR
+ .equals(resourceString.trim());
}
return false;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelPackage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelPackage.java 2008-09-18 07:48:55 UTC (rev 10347)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelPackage.java 2008-09-18 07:50:01 UTC (rev 10348)
@@ -13,7 +13,9 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.Assert;
import org.jboss.tools.smooks.model.ResourceConfigType;
+import org.jboss.tools.smooks.model.SmooksResourceListType;
/**
* @author Dart Peng<br>
@@ -25,7 +27,22 @@
private List<ResourceConfigType> beanPopulatorResourceConfigList = new ArrayList<ResourceConfigType>();
private ResourceConfigType smooksTransformTypeResourceConfig;
+
+ private SmooksResourceListType smooksResourceList;
+
+ public NormalSmooksModelPackage(SmooksResourceListType listType){
+ Assert.isNotNull(listType);
+ setSmooksResourceList(listType);
+ }
+ public SmooksResourceListType getSmooksResourceList() {
+ return smooksResourceList;
+ }
+
+ public void setSmooksResourceList(SmooksResourceListType smooksResourceList) {
+ this.smooksResourceList = smooksResourceList;
+ }
+
/**
* @return the dateResourceConfigList
*/
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java 2008-09-18 07:48:55 UTC (rev 10347)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java 2008-09-18 07:50:01 UTC (rev 10348)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.editors;
+import java.util.List;
+
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -23,6 +26,8 @@
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.jboss.tools.smooks.analyzer.NormalSmooksModelPackage;
+import org.jboss.tools.smooks.model.DocumentRoot;
+import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.utils.UIUtils;
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java 2008-09-18 07:48:55 UTC (rev 10347)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java 2008-09-18 07:50:01 UTC (rev 10348)
@@ -10,17 +10,27 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.editors;
-import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
+import java.util.Vector;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -35,12 +45,14 @@
import org.jboss.tools.smooks.analyzer.NormalSmooksModelBuilder;
import org.jboss.tools.smooks.analyzer.NormalSmooksModelPackage;
import org.jboss.tools.smooks.model.ResourceConfigType;
-import org.jboss.tools.smooks.model.impl.ResourceConfigTypeImpl;
-import org.jboss.tools.smooks.model.util.SmooksModelUtils;
+import org.jboss.tools.smooks.model.SmooksPackage;
import org.jboss.tools.smooks.ui.BeanPopulatorWarrper;
import org.jboss.tools.smooks.ui.DateTypeWarrper;
import org.jboss.tools.smooks.ui.ResourceConfigWarrper;
import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
+import org.jboss.tools.smooks.ui.wizards.NewResourceConfigFactory;
+import org.jboss.tools.smooks.ui.wizards.NewResourceConfigKey;
+import org.jboss.tools.smooks.ui.wizards.NewResourceConfigWizard;
/**
* @author Dart Peng<br>
@@ -61,6 +73,18 @@
private SectionPart sectionPart;
+ private Button addButton;
+
+ private Button removeButton;
+
+ private Button upButton;
+
+ private Button downButton;
+
+ public SmooksResourceConfigFormBlock() {
+ super();
+ }
+
public EditingDomain getDomain() {
return domain;
}
@@ -120,18 +144,21 @@
public String getText(Object element) {
if (element instanceof ResourceConfigType) {
- if(NormalSmooksModelBuilder
- .isBeanPopulator((ResourceConfigType) element)){
- String selector = ((ResourceConfigType) element).getSelector();
- if(selector == null) selector = "<NULL>";
+ if (NormalSmooksModelBuilder
+ .isBeanPopulator((ResourceConfigType) element)) {
+ String selector = ((ResourceConfigType) element)
+ .getSelector();
+ if (selector == null)
+ selector = "<NULL>";
return "BeanPopulator : " + selector;
}
- }
- if (element instanceof ResourceConfigType) {
- if(NormalSmooksModelBuilder
- .isDateConfig((ResourceConfigType) element)){
+ if (NormalSmooksModelBuilder
+ .isDateConfig((ResourceConfigType) element)) {
return "Date Type : ";
}
+ String s =((ResourceConfigType)element).getSelector();
+ if(s == null) s= "<NULL>";
+ return "UnKnown ResourceConfig - " + s;
}
return super.getText(element);
}
@@ -141,7 +168,7 @@
public void initViewers() {
if (this.getModelPackage() != null) {
- List all = new ArrayList();
+ List all = new Vector();
List list = modelPackage.getBeanPopulatorResourceConfigList();
if (list != null) {
all.addAll(list);
@@ -151,7 +178,8 @@
all.addAll(dl);
}
- dateTypeViewer.setInput(all);
+ dateTypeViewer.setInput(modelPackage.getSmooksResourceList()
+ .getAbstractResourceConfig());
}
}
@@ -185,26 +213,138 @@
Composite buttonComposite = tool.createComposite(dataTypeComposite);
gd = new GridData(GridData.FILL_VERTICAL);
+ gd.widthHint = 100;
buttonComposite.setLayoutData(gd);
GridLayout buttonLayout = new GridLayout();
buttonComposite.setLayout(buttonLayout);
- Button addButton = tool.createButton(buttonComposite, "New", SWT.NONE);
+ addButton = tool.createButton(buttonComposite, "New", SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
addButton.setLayoutData(gd);
- Button removeButton = tool.createButton(buttonComposite, "Delete",
- SWT.NONE);
+
+ removeButton = tool.createButton(buttonComposite, "Delete", SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
removeButton.setLayoutData(gd);
- Button upButton = tool.createButton(buttonComposite, "Up", SWT.NONE);
+ upButton = tool.createButton(buttonComposite, "Up", SWT.NONE);
upButton.setLayoutData(gd);
- Button downButton = tool
- .createButton(buttonComposite, "Down", SWT.NONE);
+ downButton = tool.createButton(buttonComposite, "Down", SWT.NONE);
downButton.setLayoutData(gd);
+
+ hookButtons();
}
+ private void hookButtons() {
+ addButton.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ addButtonSelected();
+ }
+
+ });
+
+ removeButton.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ removeButtonSelected();
+ }
+
+ });
+
+ upButton.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ upButtonSelected();
+ }
+
+ });
+
+ downButton.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ downButtonSelected();
+ }
+
+ });
+ }
+
+ protected void downButtonSelected() {
+ IStructuredSelection selection = (IStructuredSelection) dateTypeViewer
+ .getSelection();
+ Object object = selection.getFirstElement();
+ int index = ((List) dateTypeViewer.getInput()).indexOf(object);
+ if (index >= modelPackage.getSmooksResourceList().getAbstractResourceConfig().size()) {
+ return;
+ }
+ index++;
+ Command command = MoveCommand.create(domain, modelPackage
+ .getSmooksResourceList(), SmooksPackage.eINSTANCE
+ .getSmooksResourceListType_AbstractResourceConfig(), object,
+ index);
+ domain.getCommandStack().execute(command);
+ dateTypeViewer.refresh();
+ }
+
+ protected void upButtonSelected() {
+ IStructuredSelection selection = (IStructuredSelection) dateTypeViewer
+ .getSelection();
+ Object object = selection.getFirstElement();
+ int index = ((List) dateTypeViewer.getInput()).indexOf(object);
+ if (index <= 0) {
+ return;
+ }
+ index--;
+ Command command = MoveCommand.create(domain, modelPackage
+ .getSmooksResourceList(), SmooksPackage.eINSTANCE
+ .getSmooksResourceListType_AbstractResourceConfig(), object,
+ index);
+ domain.getCommandStack().execute(command);
+ dateTypeViewer.refresh();
+ }
+
+ protected void removeButtonSelected() {
+ IStructuredSelection selection = (IStructuredSelection) dateTypeViewer
+ .getSelection();
+ List selections = selection.toList();
+ CompoundCommand command = new CompoundCommand();
+ for (Iterator iterator = selections.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ Command command1 = RemoveCommand
+ .create(
+ domain,
+ modelPackage.getSmooksResourceList(),
+ SmooksPackage.eINSTANCE
+ .getSmooksResourceListType_AbstractResourceConfig(),
+ object);
+ // ((List) dateTypeViewer.getInput()).remove(object);
+ command.append(command1);
+ }
+ domain.getCommandStack().execute(command);
+ dateTypeViewer.refresh();
+ }
+
+ protected void addButtonSelected() {
+ NewResourceConfigWizard wizard = new NewResourceConfigWizard();
+ WizardDialog dialog = new WizardDialog(parentEditor.getSite()
+ .getShell(), wizard);
+ if (dialog.open() == Dialog.OK) {
+ NewResourceConfigKey key = wizard.getSelectedKey();
+ ResourceConfigType config = NewResourceConfigFactory.getInstance()
+ .createNewResourceConfig(key);
+ if (config != null) {
+ // ((List) dateTypeViewer.getInput()).add(config);
+ Command command = AddCommand.create(domain, modelPackage
+ .getSmooksResourceList(), SmooksPackage.eINSTANCE
+ .getSmooksResourceListType_AbstractResourceConfig(),
+ config);
+ domain.getCommandStack().execute(command);
+ dateTypeViewer.refresh();
+ }
+ }
+ }
+
protected SmooksFormEditor getParentEditor() {
return parentEditor;
}
15 years, 9 months
JBoss Tools SVN: r10347 - trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-18 03:48:55 -0400 (Thu, 18 Sep 2008)
New Revision: 10347
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelConstants.java
Log:
add some constants field
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelConstants.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelConstants.java 2008-09-18 07:48:35 UTC (rev 10346)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelConstants.java 2008-09-18 07:48:55 UTC (rev 10347)
@@ -24,6 +24,12 @@
public static final String BEAN_ID = "beanId";
+ public static final String FORMATE = "formate";
+
+ public static final String LOCALE_LANGUAGE = "Locale-Language";
+
+ public static final String LOCALE_CONTRY = "Locale-Contry";
+
public static final String BEAN_CLASS = "beanClass";
public static final String BINDINGS = "bindings";
15 years, 9 months
JBoss Tools SVN: r10346 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-18 03:48:35 -0400 (Thu, 18 Sep 2008)
New Revision: 10346
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/INewResourceConfigFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigKey.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizardPage.java
Log:
Add some java file to display the NewResourceConfig wizard
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/INewResourceConfigFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/INewResourceConfigFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/INewResourceConfigFactory.java 2008-09-18 07:48:35 UTC (rev 10346)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.jboss.tools.smooks.model.ResourceConfigType;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 18, 2008
+ */
+public interface INewResourceConfigFactory {
+ public ResourceConfigType createNewResourceConfig(NewResourceConfigKey key);
+
+ public NewResourceConfigKey[] getAllIDs();
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/INewResourceConfigFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigFactory.java 2008-09-18 07:48:35 UTC (rev 10346)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.jboss.tools.smooks.model.ParamType;
+import org.jboss.tools.smooks.model.ResourceConfigType;
+import org.jboss.tools.smooks.model.ResourceType;
+import org.jboss.tools.smooks.model.SmooksFactory;
+import org.jboss.tools.smooks.model.util.SmooksModelConstants;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 18, 2008
+ */
+public class NewResourceConfigFactory implements INewResourceConfigFactory {
+
+ private static NewResourceConfigFactory instance = null;
+
+ private NewResourceConfigFactory(){
+
+ }
+
+ public static synchronized NewResourceConfigFactory getInstance() {
+ if(instance == null) instance = new NewResourceConfigFactory();
+ return instance;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.ui.INewResourceConfigFactory#createNewResourceConfig(java.lang.String)
+ */
+ public ResourceConfigType createNewResourceConfig(NewResourceConfigKey key) {
+ if (SmooksModelConstants.BEAN_POPULATOR.equals(key.getId())) {
+ ResourceConfigType config = SmooksFactory.eINSTANCE
+ .createResourceConfigType();
+ ResourceType resource = SmooksFactory.eINSTANCE
+ .createResourceType();
+ config.setResource(resource);
+ resource.setValue(SmooksModelConstants.BEAN_POPULATOR);
+
+ ParamType idParmType = SmooksFactory.eINSTANCE.createParamType();
+ ParamType classParmType = SmooksFactory.eINSTANCE.createParamType();
+ ParamType bindingParmType = SmooksFactory.eINSTANCE
+ .createParamType();
+ idParmType.setName(SmooksModelConstants.BEAN_ID);
+ classParmType.setName(SmooksModelConstants.BEAN_CLASS);
+
+ config.getParam().add(idParmType);
+ config.getParam().add(classParmType);
+ config.getParam().add(bindingParmType);
+ return config;
+ }
+ if (SmooksModelConstants.DATE_DECODER.equals(key.getId())) {
+ ResourceConfigType config = SmooksFactory.eINSTANCE
+ .createResourceConfigType();
+ ResourceType resource = SmooksFactory.eINSTANCE
+ .createResourceType();
+ config.setResource(resource);
+
+ resource.setValue(SmooksModelConstants.DATE_DECODER);
+
+ ParamType formate = SmooksFactory.eINSTANCE.createParamType();
+ ParamType language = SmooksFactory.eINSTANCE.createParamType();
+ ParamType contry = SmooksFactory.eINSTANCE.createParamType();
+ formate.setName(SmooksModelConstants.FORMATE);
+ language.setName(SmooksModelConstants.LOCALE_LANGUAGE);
+ contry.setName(SmooksModelConstants.LOCALE_CONTRY);
+
+ config.getParam().add(formate);
+ config.getParam().add(language);
+ config.getParam().add(contry);
+
+ return config;
+ }
+ return null;
+ }
+
+ public NewResourceConfigKey[] getAllIDs() {
+ NewResourceConfigKey bean = new NewResourceConfigKey();
+ bean.setId(SmooksModelConstants.BEAN_POPULATOR);
+ bean.setName("BeanPopulator");
+
+ NewResourceConfigKey date = new NewResourceConfigKey();
+ date.setId(SmooksModelConstants.DATE_DECODER);
+ date.setName("Date Decoder");
+ return new NewResourceConfigKey[] { bean, date };
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigKey.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigKey.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigKey.java 2008-09-18 07:48:35 UTC (rev 10346)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 18, 2008
+ */
+public class NewResourceConfigKey {
+ private String id = null;
+ private String name = null;
+
+ private Image image = null;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Image getImage() {
+ return image;
+ }
+
+ public void setImage(Image image) {
+ this.image = image;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigKey.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizard.java 2008-09-18 07:48:35 UTC (rev 10346)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 18, 2008
+ */
+public class NewResourceConfigWizard extends Wizard {
+ protected NewResourceConfigWizardPage page = null;
+
+ private NewResourceConfigKey selectedKey = null;
+
+
+ @Override
+ public void addPages() {
+ if(page == null){
+ page = new NewResourceConfigWizardPage("New ResourceConfig");
+ }
+ this.addPage(page);
+ super.addPages();
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ this.setSelectedKey(page.getSelectedKey());
+ return true;
+ }
+
+
+
+ public NewResourceConfigKey getSelectedKey() {
+ return selectedKey;
+ }
+
+
+
+ public void setSelectedKey(NewResourceConfigKey selectedKey) {
+ this.selectedKey = selectedKey;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizardPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizardPage.java 2008-09-18 07:48:35 UTC (rev 10346)
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 18, 2008
+ */
+public class NewResourceConfigWizardPage extends WizardPage implements ISelectionChangedListener{
+
+ private NewResourceConfigKey selectedKey = null;
+
+ public NewResourceConfigWizardPage(String pageName, String title,
+ ImageDescriptor titleImage) {
+ super(pageName, title, titleImage);
+ // TODO Auto-generated constructor stub
+ }
+
+ public NewResourceConfigWizardPage(String pageName) {
+ super(pageName);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite mainComposite = new Composite(parent,SWT.NONE);
+ FillLayout layout = new FillLayout();
+// layout.marginHeight = 350;
+ mainComposite.setLayout(layout);
+ TableViewer viewer = new TableViewer(mainComposite);
+ viewer.setContentProvider(new NewResourceConfigKeyContentProvider());
+ viewer.setLabelProvider(new NewResourceConfigKeyLabelProvider());
+ viewer.setInput(NewResourceConfigFactory.getInstance().getAllIDs());
+ viewer.addSelectionChangedListener(this);
+ setControl(mainComposite);
+
+ validatePageFinish();
+ }
+
+ protected void validatePageFinish(){
+ String error = null;
+ if(selectedKey == null){
+ error = "Please select one key";
+ }
+
+ setErrorMessage(error);
+ setPageComplete(error == null);
+ }
+
+ private class NewResourceConfigKeyContentProvider implements IStructuredContentProvider{
+
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof List){
+ return ((List)inputElement).toArray();
+ }
+ if(inputElement.getClass().isArray()){
+ return (Object[])inputElement;
+ }
+ return new Object[]{};
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+ }
+
+ private class NewResourceConfigKeyLabelProvider extends LabelProvider{
+
+ public Image getImage(Object element) {
+ if(element instanceof NewResourceConfigKey){
+ return ((NewResourceConfigKey)element).getImage();
+ }
+ return super.getImage(element);
+ }
+
+ public String getText(Object element) {
+ if(element instanceof NewResourceConfigKey){
+ return ((NewResourceConfigKey)element).getName();
+ }
+ return super.getText(element);
+ }
+
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ Object obj = ((IStructuredSelection)event.getSelection()).getFirstElement();
+ if(obj != null && obj instanceof NewResourceConfigKey){
+ selectedKey = (NewResourceConfigKey)obj;
+ }
+
+ validatePageFinish();
+ }
+
+ public NewResourceConfigKey getSelectedKey() {
+ return selectedKey;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/NewResourceConfigWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r10345 - trunk/ws/plugins/org.jboss.tools.ws.core.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-09-18 03:00:40 -0400 (Thu, 18 Sep 2008)
New Revision: 10345
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
Log:
change the jboss ws version for fixing JBIDE-2636 --version number for jbossws runtimes are free-form, should be more controlled
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-09-18 06:48:18 UTC (rev 10344)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-09-18 07:00:40 UTC (rev 10345)
@@ -12,7 +12,7 @@
<member category="jbossws.category "/>
</project-facet>
- <project-facet-version facet="jbossws.core" version="2.0.1">
+ <project-facet-version facet="jbossws.core" version="2.0">
<constraint>
<requires facet="jst.web" version="2.2,2.3,2.4,2.5"/>
</constraint>
15 years, 9 months
JBoss Tools SVN: r10344 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-09-18 02:48:18 -0400 (Thu, 18 Sep 2008)
New Revision: 10344
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboBoxField.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboFieldEditor.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ITaggedFieldEditor.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossRuntimeListFieldEditor.java
Log:
fix JBIDE-2636 --version number for jbossws runtimes are free-form, should be more controlled
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboBoxField.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboBoxField.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboBoxField.java 2008-09-18 06:48:18 UTC (rev 10344)
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * 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.ws.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author Grid.Qian
+ *
+ */
+public class ComboBoxField extends BaseField implements ISelectionChangedListener {
+
+ ComboViewer comboControl = null;
+ List<String> values = new ArrayList<String>();
+
+ public ComboBoxField(Composite parent,List<String> values, ILabelProvider labelProvider,
+ Object value, boolean flatStyle) {
+ this(parent, values, value, flatStyle);
+ comboControl.setLabelProvider(labelProvider);
+ }
+
+ public ComboBoxField(Composite parent,List<String> values, Object value, boolean editable) {
+ this.values = values;
+ /*
+ * Used combo box instead of custom combobox(CCombo),
+ * CCombo looks ugly under MAC OS X
+ */
+ Combo combo;
+ if(editable==true) {
+
+ combo = new Combo(parent, SWT.DROP_DOWN);
+ } else {
+ combo = new Combo(parent, SWT.READ_ONLY);
+ }
+ combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ comboControl = new ComboViewer(combo);
+ comboControl.setContentProvider(new IStructuredContentProvider() {
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput,
+ Object newInput) {
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return ComboBoxField.this.values.toArray();
+ }
+ });
+
+ comboControl.addSelectionChangedListener(this);
+ comboControl.getCombo().addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ firePropertyChange(new Object(), comboControl.getCombo().getText());
+ }});
+ comboControl.setLabelProvider(new ILabelProvider() {
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ public String getText(Object element) {
+ return element.toString();
+ }
+ });
+ comboControl.setInput(values);
+ comboControl.setSelection(new StructuredSelection(value), true);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ firePropertyChange("", ((StructuredSelection)event.getSelection()).getFirstElement()); //$NON-NLS-1$
+ }
+
+ public Combo getComboControl() {
+ return comboControl.getCombo();
+ }
+
+ @Override
+ public Control getControl() {
+ return getComboControl();
+ }
+
+ public void setValue(Object newValue) {
+ comboControl.setSelection(new StructuredSelection(newValue));
+ comboControl.getCombo().setText(newValue.toString());
+ }
+
+ public void setTags(String[] tags,String value) {
+ values = Arrays.asList(tags);
+ comboControl.removeSelectionChangedListener(this);
+ comboControl.refresh(true);
+ comboControl.addPostSelectionChangedListener(this);
+ comboControl.setSelection(new StructuredSelection(value));
+ }
+ /*
+ * We can't modify combo, change style of this object,
+ * if we such functionality please use CCombo
+ *
+ */
+ public void setEditable(
+ boolean ediatble) {
+ //comboControl.getCCombo().setEditable(false);
+ }
+}
\ No newline at end of file
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboFieldEditor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboFieldEditor.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ComboFieldEditor.java 2008-09-18 06:48:18 UTC (rev 10344)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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.ws.ui.preferences;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Grid Qian
+ */
+public class ComboFieldEditor extends BaseFieldEditor implements ITaggedFieldEditor,PropertyChangeListener{
+
+ List<String> values = null;
+
+ boolean editable = false;
+
+ public ComboFieldEditor(String name, String label, List<String> values,Object defaultValue,boolean editableSelection) {
+ super(name, label, defaultValue);
+ this.values = Collections.unmodifiableList(values);
+ this.editable = editableSelection;
+ }
+
+ private ComboBoxField comboField;
+
+ @Override
+ public Object[] getEditorControls(Object composite) {
+ return new Control[] {getComboControl((Composite)composite)};
+ }
+
+ @Override
+ public void doFillIntoGrid(Object parent) {
+ }
+
+ public Control getComboControl(Composite composite) {
+ if(comboField == null) {
+ comboField = new ComboBoxField(composite,values,getValue(),editable);
+ comboField.addPropertyChangeListener(this);
+ final Combo combo =comboField.getComboControl();
+ combo.addDisposeListener(new DisposeListener(){
+ public void widgetDisposed(DisposeEvent e) {
+ dispose(e);
+ combo.removeDisposeListener(this);
+ }
+ });
+ } else if(composite!=null) {
+ Assert.isTrue(comboField.getControl().getParent()==composite);
+ }
+ return comboField.getControl();
+ }
+
+ @Override
+ public Object[] getEditorControls() {
+ return new Control[]{comboField.getControl()};
+ }
+
+ public void save(Object object) {
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ setValue(evt.getNewValue());
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
+ */
+ public String[] getTags() {
+ return comboField.getComboControl().getItems();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
+ */
+ public void setTags(String[] tags) {
+ comboField.setTags(tags,getValueAsString());
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
+ */
+ @Override
+ public int getNumberOfControls() {
+ return 1;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#setEditable(boolean)
+ */
+ @Override
+ public void setEditable(boolean ediatble) {
+ super.setEditable(ediatble);
+ comboField.setEditable(ediatble);
+ }
+
+ public void setValue(Object newValue) {
+ if(newValue==null) {
+ return;
+ }
+ super.setValue(newValue);
+ if(comboField!=null) {
+ comboField.removePropertyChangeListener(this);
+ comboField.setValue(newValue.toString());
+ comboField.addPropertyChangeListener(this);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ITaggedFieldEditor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ITaggedFieldEditor.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/ITaggedFieldEditor.java 2008-09-18 06:48:18 UTC (rev 10344)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.ws.ui.preferences;
+
+public interface ITaggedFieldEditor extends IFieldEditor {
+
+ /**
+ *
+ * @return
+ */
+ public String[] getTags();
+
+ /**
+ *
+ * @param tags
+ */
+ public void setTags(String[] tags);
+}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossRuntimeListFieldEditor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossRuntimeListFieldEditor.java 2008-09-18 06:34:37 UTC (rev 10343)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossRuntimeListFieldEditor.java 2008-09-18 06:48:18 UTC (rev 10344)
@@ -55,6 +55,9 @@
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.jboss.tools.ws.ui.utils.UIUtils;
import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
@@ -418,8 +421,8 @@
IFieldEditor name = createTextEditor(SRT_NAME,
JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Name2, ""); //$NON-NLS-1$
- IFieldEditor version = createTextEditor(SRT_VERSION,
- JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version, ""); //$NON-NLS-1$
+ IFieldEditor version = createComboEditor(SRT_VERSION,
+ JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version,getESBFacetVersions(), ""); //$NON-NLS-1$
IFieldEditor homeDir = createBrowseFolderEditor(
SRT_HOMEDIR,
@@ -564,6 +567,19 @@
return true;
}
+
+ /*
+ * get facet version.
+ */
+ private List<String> getESBFacetVersions(){
+ List<String> versions = new ArrayList<String>();
+ IProjectFacet esbfacet = ProjectFacetsManager.getProjectFacet("jbossws.core");
+ for(IProjectFacetVersion version: esbfacet.getVersions()){
+ versions.add(version.getVersionString());
+ }
+
+ return versions;
+ }
/**
* Return JBossWS Runtime instance initialized by user input
@@ -605,6 +621,16 @@
defaultValue) });
return editor;
}
+
+ public IFieldEditor createComboEditor(String name, String label,
+ List<String> values, String defaultValue) {
+ CompositeEditor editor = new CompositeEditor(name, label,
+ defaultValue);
+ editor.addFieldEditors(new IFieldEditor[] {
+ new LabelFieldEditor(name, label),
+ new ComboFieldEditor(name, label, values, defaultValue, false) });
+ return editor;
+ }
public ButtonFieldEditor.ButtonPressedAction createSelectFolderAction(
String buttonName) {
15 years, 9 months
JBoss Tools SVN: r10343 - in trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core: messages and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-09-18 02:34:37 -0400 (Thu, 18 Sep 2008)
New Revision: 10343
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
Log:
JBIDE-2782: fix the bug that unable to generate implementation class
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2008-09-18 05:50:15 UTC (rev 10342)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2008-09-18 06:34:37 UTC (rev 10343)
@@ -71,7 +71,7 @@
StringBuffer inputResult = new StringBuffer();
convertInputStreamToString(errorResult, proc.getErrorStream());
- convertInputStreamToString(errorResult, proc.getInputStream());
+ convertInputStreamToString(inputResult, proc.getInputStream());
int exitValue = proc.waitFor();
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-09-18 05:50:15 UTC (rev 10342)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-09-18 06:34:37 UTC (rev 10343)
@@ -398,8 +398,15 @@
.getComponentType()));
} else if (type instanceof ParameterizedType) {
ParameterizedType ptype = (ParameterizedType) type;
- ast.newParameterizedType(copyTypeFromOtherASTNode(ast, ptype
+ ParameterizedType newParaType = ast.newParameterizedType(copyTypeFromOtherASTNode(ast, ptype
.getType()));
+ for(Object arg : ptype.typeArguments()){
+ if(arg instanceof Type){
+ Type newArg = copyTypeFromOtherASTNode(ast, (Type)arg);
+ newParaType.typeArguments().add(newArg);
+ }
+ }
+ return newParaType;
} else if (type instanceof WildcardType) {
WildcardType sourcetype = (WildcardType) type;
WildcardType wtype = ast.newWildcardType();
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-09-18 05:50:15 UTC (rev 10342)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-09-18 06:34:37 UTC (rev 10343)
@@ -36,7 +36,7 @@
JBossWSFacetInstallPage_Title=JBossWS Facet
JBossWSFacetInstallPage_Description=Select JBossWS Web Service runtime
JBossWSFacetInstallPage_ServerSuppliedJBossWS=Server Supplied JBossWS Runtime
-JBossWSFacetInstallPage_Deploy= Add all JBossWS runtime jars into the deploy archive
+JBossWSFacetInstallPage_Deploy= Package all JBossWS runtime jars into the deployment archive
JBossWSFacetInstallPage_New=New...
Client_Sample_Run_Over= Call Over!
15 years, 9 months
JBoss Tools SVN: r10342 - in trunk/smooks/plugins: org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-18 01:50:15 -0400 (Thu, 18 Sep 2008)
New Revision: 10342
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java
trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/AbstractSmooksModelDetailPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/BeanPopulatorDetailPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/DateTypeDetailPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java
Log:
add new functions for editing smooks configuration file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanModelLoadComposite.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -117,17 +117,9 @@
gd.grabExcessHorizontalSpace = true;
classText.setLayoutData(gd);
classText.addModifyListener(new ModifyListener() {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse
- * .swt.events.ModifyEvent)
- */
public void modifyText(ModifyEvent arg0) {
classFullName = classText.getText();
}
-
});
classBrowseButton = new Button(classTextContainer, SWT.NONE);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -71,10 +71,10 @@
XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
true);
if (value != null) {
- if (value instanceof List) {
+ if (value instanceof List && !((List)value).isEmpty()) {
return ((List) value).get(0).toString().trim();
}
- return value.toString();
+// return value.toString();
}
return null;
}
@@ -104,4 +104,17 @@
smooksModel.getMixed().add(
XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text);
}
+
+ public static void setTextToSmooksType(AnyType smooksModel, String text){
+ cleanTextToSmooksType(smooksModel);
+ appendTextToSmooksType(smooksModel,text);
+ }
+
+ public static void cleanTextToSmooksType(AnyType smooksModel) {
+ Object obj = smooksModel.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,true);
+ if(obj instanceof List){
+ ((List)obj).clear();
+ }
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/NormalSmooksModelBuilder.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -58,7 +58,7 @@
}
}
- protected boolean isSmooksTransformType(ResourceConfigType config) {
+ public static boolean isSmooksTransformType(ResourceConfigType config) {
if (config == null)
return false;
String selector = config.getSelector();
@@ -68,7 +68,7 @@
return false;
}
- protected boolean isDateConfig(ResourceConfigType config) {
+ public static boolean isDateConfig(ResourceConfigType config) {
if (config == null)
return false;
ResourceType resource = config.getResource();
@@ -80,7 +80,7 @@
return false;
}
- protected boolean isBeanPopulator(ResourceConfigType config) {
+ public static boolean isBeanPopulator(ResourceConfigType config) {
if (config == null)
return false;
ResourceType resource = config.getResource();
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/AbstractSmooksModelDetailPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/AbstractSmooksModelDetailPage.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/AbstractSmooksModelDetailPage.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -31,12 +31,16 @@
IFormPart formPart;
ISelection selection;
+
+ protected boolean canFireChange = false;;
FormToolkit formToolKit = null;
protected ResourceConfigType oldResourceConfigList;
protected ResourceConfigType resourceConfigList;
+
+ protected IManagedForm managedForm ;
EditingDomain domain;
SmooksFormEditor parentEditor;
@@ -93,6 +97,7 @@
* @see org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm)
*/
public void initialize(IManagedForm form) {
+ this.managedForm = form;
if (form != null) {
formToolKit = form.getToolkit();
}
@@ -126,9 +131,13 @@
* @see org.eclipse.ui.forms.IFormPart#refresh()
*/
public void refresh() {
-
+ canFireChange = false;
+ initSectionUI();
+ canFireChange = true;
}
+ abstract protected void initSectionUI() ;
+
/*
* (non-Javadoc)
*
@@ -209,4 +218,12 @@
this.domain = domain;
}
+ public boolean isCanFireChange() {
+ return canFireChange;
+ }
+
+ public void setCanFireChange(boolean canFireChange) {
+ this.canFireChange = canFireChange;
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/BeanPopulatorDetailPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/BeanPopulatorDetailPage.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/BeanPopulatorDetailPage.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -10,9 +10,23 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.editors;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
+import org.eclipse.jdt.ui.IJavaElementSearchConstants;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -23,8 +37,15 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.jboss.tools.smooks.model.ParamType;
+import org.jboss.tools.smooks.model.SmooksFactory;
import org.jboss.tools.smooks.model.SmooksPackage;
+import org.jboss.tools.smooks.model.util.SmooksModelConstants;
import org.jboss.tools.smooks.model.util.SmooksModelUtils;
+import org.jboss.tools.smooks.ui.SmooksUIActivator;
/**
* @author Dart Peng<br>
@@ -108,7 +129,40 @@
}
protected void clazzBrowseButtonSelected() {
+ IFileEditorInput input = (IFileEditorInput) this.parentEditor
+ .getEditorInput();
+ IJavaProject javaProject = null;
+ if (input != null) {
+ IFile file = input.getFile();
+ javaProject = JavaCore.create(file.getProject());
+ }
+ if (javaProject == null)
+ return;
+ IJavaSearchScope scope = JavaSearchScopeFactory.getInstance()
+ .createJavaProjectSearchScope(javaProject, true);
+ SelectionDialog dialog;
+ try {
+ IWorkbenchWindow runnableContext = SmooksUIActivator.getDefault()
+ .getWorkbench().getActiveWorkbenchWindow();
+ dialog = JavaUI.createTypeDialog(this.parentEditor.getSite()
+ .getShell(), runnableContext, scope,
+ IJavaElementSearchConstants.CONSIDER_CLASSES, false);
+ dialog.setMessage("Source Java Bean:");
+ dialog.setTitle("Search java bean");
+ if (dialog.open() == Window.OK) {
+ Object[] results = dialog.getResult();
+ if (results.length > 0) {
+ Object result = results[0];
+ String packageFullName = JavaModelUtil
+ .getTypeContainerName((IType) result);
+ beanClassText.setText(packageFullName + "."
+ + ((IType) result).getElementName());
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
@Override
@@ -116,11 +170,6 @@
return true;
}
- @Override
- public void refresh() {
- configControls();
- }
-
private void hookContorls() {
selectorText.addModifyListener(new ModifyListener() {
@@ -160,7 +209,6 @@
}
private void configControls() {
-
if (resourceConfigList != null) {
String selector = "";
selector = resourceConfigList.getSelector();
@@ -180,27 +228,77 @@
beanClassText.setText(beanClass);
beanIDText.setText(beanId);
}
-
}
protected void beanIDChanged() {
-
+ if (!isCanFireChange())
+ return;
+ String beanIdStr = beanIDText.getText();
+ if (beanIdStr == null)
+ return;
+ List paramList = resourceConfigList.getParam();
+ ParamType beanId = null;
+ for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+ ParamType param = (ParamType) iterator.next();
+ String name = param.getName();
+ if (SmooksModelConstants.BEAN_ID.equals(name)) {
+ beanId = param;
+ break;
+ }
+ }
+ if (beanId == null) {
+ beanId = SmooksFactory.eINSTANCE.createParamType();
+ beanId.setName(SmooksModelConstants.BEAN_ID);
+ AddCommand.create(domain, resourceConfigList,
+ SmooksPackage.eINSTANCE.getResourceConfigType_Param(),
+ beanId).execute();
+ }
+ SmooksModelUtils.setTextToSmooksType(beanId, beanIdStr);
+ this.parentEditor.fireEditorDirty(true);
}
protected void beanClassChanged() {
-
+ if (!isCanFireChange())
+ return;
+ String beanClassStr = beanClassText.getText();
+ if (beanClassStr == null)
+ return;
+ List paramList = resourceConfigList.getParam();
+ ParamType beanClass = null;
+ for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+ ParamType param = (ParamType) iterator.next();
+ String name = param.getName();
+ if (SmooksModelConstants.BEAN_CLASS.equals(name)) {
+ beanClass = param;
+ break;
+ }
+ }
+ if (beanClass == null) {
+ beanClass = SmooksFactory.eINSTANCE.createParamType();
+ beanClass.setName(SmooksModelConstants.BEAN_CLASS);
+ AddCommand.create(domain, resourceConfigList,
+ SmooksPackage.eINSTANCE.getResourceConfigType_Param(),
+ beanClass).execute();
+ }
+ SmooksModelUtils.setTextToSmooksType(beanClass, beanClassStr);
+ this.parentEditor.fireEditorDirty(true);
}
protected void selectorChanged() {
+ if (!isCanFireChange())
+ return;
String selector = selectorText.getText();
if (selector != null) {
- Command command = SetCommand.create(this.getDomain(), resourceConfigList,
- SmooksPackage.eINSTANCE.getResourceConfigType_Selector(),
- selector);
+ Command command = SetCommand.create(this.getDomain(),
+ resourceConfigList, SmooksPackage.eINSTANCE
+ .getResourceConfigType_Selector(), selector);
getDomain().getCommandStack().execute(command);
}
- // resourceConfigList.getResource()
- // this.getDomain().
}
+ @Override
+ protected void initSectionUI() {
+ configControls();
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/DateTypeDetailPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/DateTypeDetailPage.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/DateTypeDetailPage.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -41,23 +41,6 @@
}
@Override
- public void refresh() {
- if(this.resourceConfigList != null){
- String formate = SmooksModelUtils.getParmaText("format", resourceConfigList);
- String locallang = SmooksModelUtils.getParmaText("Locale-Language", resourceConfigList);
- String localcontry = SmooksModelUtils.getParmaText("Locale-Contry", resourceConfigList);
- if(formate == null) formate = "";
- if(locallang == null) locallang = "";
- if(localcontry == null) localcontry = "";
-
-
- formatText.setText(formate);
- localeContryCombo.setText(localcontry);
- localeLangaugeCombo.setText(locallang);
- }
- }
-
- @Override
protected void createSectionContents(Composite parent) {
GridLayout layout = new GridLayout();
layout.numColumns = 2;
@@ -80,4 +63,21 @@
formToolKit.paintBordersFor(parent);
}
+ @Override
+ protected void initSectionUI() {
+ if(this.resourceConfigList != null){
+ String formate = SmooksModelUtils.getParmaText("format", resourceConfigList);
+ String locallang = SmooksModelUtils.getParmaText("Locale-Language", resourceConfigList);
+ String localcontry = SmooksModelUtils.getParmaText("Locale-Contry", resourceConfigList);
+ if(formate == null) formate = "";
+ if(locallang == null) locallang = "";
+ if(localcontry == null) localcontry = "";
+
+
+ formatText.setText(formate);
+ localeContryCombo.setText(localcontry);
+ localeLangaugeCombo.setText(locallang);
+ }
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -51,6 +51,8 @@
private ComposedAdapterFactory adapterFactory;
private AdapterFactoryEditingDomain editingDomain;
private Resource smooksResource;
+
+ private boolean forceDirty = false;
public SmooksFormEditor() {
super();
@@ -67,8 +69,15 @@
protected CommandStack createCommandStack() {
return new BasicCommandStack();
}
+
+
@Override
+ public boolean isDirty() {
+ return forceDirty || super.isDirty();
+ }
+
+ @Override
protected void addPages() {
graphicalPage = new SmooksGraphicalFormPage(this, "graph", "Mapping");
try {
@@ -130,7 +139,13 @@
@Override
public void doSave(IProgressMonitor monitor) {
graphicalPage.doSave(monitor);
+ fireEditorDirty(false);
}
+
+ public void fireEditorDirty(boolean dirty){
+ this.forceDirty = dirty;
+ this.firePropertyChange(PROP_DIRTY);
+ }
@Override
public void doSaveAs() {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -1136,8 +1136,12 @@
* @return the editingDomain
*/
protected AdapterFactoryEditingDomain getEditingDomain() {
- FormEditor parentEditor = this.getEditor();
- editingDomain = ((SmooksFormEditor) parentEditor).getEditingDomain();
+ if (editingDomain == null) {
+ FormEditor parentEditor = this.getEditor();
+ editingDomain = ((SmooksFormEditor) parentEditor)
+ .getEditingDomain();
+ editingDomain.getCommandStack().addCommandStackListener(this);
+ }
return editingDomain;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java 2008-09-17 20:14:53 UTC (rev 10341)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java 2008-09-18 05:50:15 UTC (rev 10342)
@@ -16,6 +16,7 @@
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
@@ -31,9 +32,11 @@
import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
+import org.jboss.tools.smooks.analyzer.NormalSmooksModelBuilder;
import org.jboss.tools.smooks.analyzer.NormalSmooksModelPackage;
import org.jboss.tools.smooks.model.ResourceConfigType;
import org.jboss.tools.smooks.model.impl.ResourceConfigTypeImpl;
+import org.jboss.tools.smooks.model.util.SmooksModelUtils;
import org.jboss.tools.smooks.ui.BeanPopulatorWarrper;
import org.jboss.tools.smooks.ui.DateTypeWarrper;
import org.jboss.tools.smooks.ui.ResourceConfigWarrper;
@@ -107,12 +110,33 @@
protected void registerPages(DetailsPart detailsPart) {
detailsPart.registerPage(BeanPopulatorWarrper.class,
new BeanPopulatorDetailPage(getParentEditor(), getDomain()));
- detailsPart.registerPage(DateTypeWarrper.class,
- new DateTypeDetailPage(getParentEditor(), getDomain()));
+ detailsPart.registerPage(DateTypeWarrper.class, new DateTypeDetailPage(
+ getParentEditor(), getDomain()));
}
protected void configDateTypeViewer() {
dateTypeViewer.setContentProvider(new DateTypeContentProvider());
+ dateTypeViewer.setLabelProvider(new LabelProvider() {
+
+ public String getText(Object element) {
+ if (element instanceof ResourceConfigType) {
+ if(NormalSmooksModelBuilder
+ .isBeanPopulator((ResourceConfigType) element)){
+ String selector = ((ResourceConfigType) element).getSelector();
+ if(selector == null) selector = "<NULL>";
+ return "BeanPopulator : " + selector;
+ }
+ }
+ if (element instanceof ResourceConfigType) {
+ if(NormalSmooksModelBuilder
+ .isDateConfig((ResourceConfigType) element)){
+ return "Date Type : ";
+ }
+ }
+ return super.getText(element);
+ }
+
+ });
}
public void initViewers() {
@@ -200,7 +224,7 @@
.createResourceConfigWarrper((ResourceConfigType) obj);
if (warrper != null) {
selection = new StructuredSelection(warrper);
- managedForm.fireSelectionChanged(sectionPart,selection);
+ managedForm.fireSelectionChanged(sectionPart, selection);
return;
}
}
15 years, 9 months
JBoss Tools SVN: r10341 - in trunk/archives/features: org.jboss.ide.eclipse.archives.test.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-09-17 16:14:53 -0400 (Wed, 17 Sep 2008)
New Revision: 10341
Added:
trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/
trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/.project
trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/License.txt
trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/build.properties
trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/feature.xml
Log:
adding archives test feature
Added: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/.project
===================================================================
--- trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/.project (rev 0)
+++ trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/.project 2008-09-17 20:14:53 UTC (rev 10341)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.ide.eclipse.archives.test.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/.project
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/License.txt
===================================================================
--- trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/License.txt (rev 0)
+++ trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/License.txt 2008-09-17 20:14:53 UTC (rev 10341)
@@ -0,0 +1,149 @@
+GNU Lesser General Public License
+Version 2.1, February 1999
+
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+as the successor of the GNU Library Public License, version 2, hence
+the version number 2.1.]
+
+Preamble
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
+
+When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
+
+To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
+
+To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
+
+Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
+
+When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
+
+We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
+
+For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
+
+In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
+
+Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+a) The modified work must itself be a software library.
+
+b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+
+c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+
+d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+
+b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
+
+c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+
+d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+
+e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+
+b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
Property changes on: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/License.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/build.properties
===================================================================
--- trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/build.properties (rev 0)
+++ trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/build.properties 2008-09-17 20:14:53 UTC (rev 10341)
@@ -0,0 +1 @@
+bin.includes = feature.xml
Property changes on: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/build.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/feature.xml
===================================================================
--- trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/feature.xml (rev 0)
+++ trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/feature.xml 2008-09-17 20:14:53 UTC (rev 10341)
@@ -0,0 +1,426 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.ide.eclipse.archives.test.feature"
+ label="org.jboss.ide.eclipse.archives.test.feature"
+ version="1.0.0"
+ provider-name="JBoss, Inc.">
+
+ <description url="http://www.jboss.com/products/jbosside">
+ Select 'More Info'
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://osdn.dl.sourceforge.net/sourceforge/jboss/LGPL.html">
+ JBoss Eclipse IDE is under the LGPL Licence
+GNU LESSER GENERAL PUBLIC LICENSE
+Version 2.1, February 1999
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+[This is the first released version of the Lesser GPL. It also
+counts
+as the successor of the GNU Library Public License, version 2,
+hence
+the version number 2.1.]
+Preamble
+The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General
+Public Licenses are intended to guarantee your freedom to share
+and change free software--to make sure the software is free for
+all its users.
+This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of
+the Free Software Foundation and other authors who decide to
+use it. You can use it too, but we suggest you first think carefully
+about whether this license or the ordinary General Public License
+is the better strategy to use in any particular case, based on
+the explanations below.
+When we speak of free software, we are referring to freedom of
+use, not price. Our General Public Licenses are designed to make
+sure that you have the freedom to distribute copies of free software
+(and charge for this service if you wish); that you receive source
+code or can get it if you want it; that you can change the software
+and use pieces of it in new free programs; and that you are informed
+that you can do these things.
+To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender
+these rights. These restrictions translate to certain responsibilities
+for you if you distribute copies of the library or if you modify
+it.
+For example, if you distribute copies of the library, whether
+gratis or for a fee, you must give the recipients all the rights
+that we gave you. You must make sure that they, too, receive
+or can get the source code. If you link other code with the library,
+you must provide complete object files to the recipients, so
+that they can relink them with the library after making changes
+to the library and recompiling it. And you must show them these
+terms so they know their rights.
+We protect your rights with a two-step method: (1) we copyright
+the library, and (2) we offer you this license, which gives you
+legal permission to copy, distribute and/or modify the library.
+To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library
+is modified by someone else and passed on, the recipients should
+know that what they have is not the original version, so that
+the original author's reputation will not be affected by problems
+that might be introduced by others.
+Finally, software patents pose a constant threat to the existence
+of any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining
+a restrictive license from a patent holder. Therefore, we insist
+that any patent license obtained for a version of the library
+must be consistent with the full freedom of use specified in
+this license.
+Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries,
+and is quite different from the ordinary General Public License.
+We use this license for certain libraries in order to permit
+linking those libraries into non-free programs.
+When a program is linked with a library, whether statically or
+using a shared library, the combination of the two is legally
+speaking a combined work, a derivative of the original library.
+The ordinary General Public License therefore permits such linking
+only if the entire combination fits its criteria of freedom.
+The Lesser General Public License permits more lax criteria for
+linking other code with the library.
+We call this license the "Lesser" General Public License because
+it does Less to protect the user's freedom than the ordinary
+General Public License. It also provides other free software
+developers Less of an advantage over competing non-free programs.
+These disadvantages are the reason we use the ordinary General
+Public License for many libraries. However, the Lesser license
+provides advantages in certain special circumstances.
+For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that
+it becomes a de-facto standard. To achieve this, non-free programs
+must be allowed to use the library. A more frequent case is that
+a free library does the same job as widely used non-free libraries.
+In this case, there is little to gain by limiting the free library
+to free software only, so we use the Lesser General Public License.
+In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body
+of free software. For example, permission to use the GNU C Library
+in non-free programs enables many more people to use the whole
+GNU operating system, as well as its variant, the GNU/Linux operating
+system.
+Although the Lesser General Public License is Less protective
+of the users' freedom, it does ensure that the user of a program
+that is linked with the Library has the freedom and the wherewithal
+to run that program using a modified version of the Library.
+The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between
+a "work based on the library" and a "work that uses the library".
+The former contains code derived from the library, whereas the
+latter must be combined with the library in order to run.
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+0. This License Agreement applies to any software library or
+other program which contains a notice placed by the copyright
+holder or other authorized party saying it may be distributed
+under the terms of this Lesser General Public License (also called
+"this License"). Each licensee is addressed as "you".
+A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+The "Library", below, refers to any such software library or
+work which has been distributed under these terms. A "work based
+on the Library" means either the Library or any derivative work
+under copyright law: that is to say, a work containing the Library
+or a portion of it, either verbatim or with modifications and/or
+translated straightforwardly into another language. (Hereinafter,
+translation is included without limitation in the term "modification".)
+"Source code" for a work means the preferred form of the work
+for making modifications to it. For a library, complete source
+code means all the source code for all modules it contains, plus
+any associated interface definition files, plus the scripts used
+to control compilation and installation of the library.
+Activities other than copying, distribution and modification
+are not covered by this License; they are outside its scope.
+The act of running a program using the Library is not restricted,
+and output from such a program is covered only if its contents
+constitute a work based on the Library (independent of the use
+of the Library in a tool for writing it). Whether that is true
+depends on what the Library does and what the program that uses
+the Library does.
+1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided
+that you conspicuously and appropriately publish on each copy
+an appropriate copyright notice and disclaimer of warranty; keep
+intact all the notices that refer to this License and to the
+absence of any warranty; and distribute a copy of this License
+along with the Library.
+You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange
+for a fee.
+2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section
+1 above, provided that you also meet all of these conditions:
+a) The modified work must itself be a software library.
+b) You must cause the files modified to carry prominent notices
+stating that you changed the files and the date of any change.
+c) You must cause the whole of the work to be licensed at no
+charge to all third parties under the terms of this License.
+d) If a facility in the modified Library refers to a function
+or a table of data to be supplied by an application program that
+uses the facility, other than as an argument passed when the
+facility is invoked, then you must make a good faith effort to
+ensure that, in the event an application does not supply such
+function or table, the facility still operates, and performs
+whatever part of its purpose remains meaningful.
+(For example, a function in a library to compute square roots
+has a purpose that is entirely well-defined independent of the
+application. Therefore, Subsection 2d requires that any application-supplied
+function or table used by this function must be optional: if
+the application does not supply it, the square root function
+must still compute square roots.)
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works
+in themselves, then this License, and its terms, do not apply
+to those sections when you distribute them as separate works.
+But when you distribute the same sections as part of a whole
+which is a work based on the Library, the distribution of the
+whole must be on the terms of this License, whose permissions
+for other licensees extend to the entire whole, and thus to each
+and every part regardless of who wrote it.
+Thus, it is not the intent of this section to claim rights or
+contest your rights to work written entirely by you; rather,
+the intent is to exercise the right to control the distribution
+of derivative or collective works based on the Library.
+In addition, mere aggregation of another work not based on the
+Library with the Library (or with a work based on the Library)
+on a volume of a storage or distribution medium does not bring
+the other work under the scope of this License.
+3. You may opt to apply the terms of the ordinary GNU General
+Public License instead of this License to a given copy of the
+Library. To do this, you must alter all the notices that refer
+to this License, so that they refer to the ordinary GNU General
+Public License, version 2, instead of to this License. (If a
+newer version than version 2 of the ordinary GNU General Public
+License has appeared, then you can specify that version instead
+if you wish.) Do not make any other change in these notices.
+Once this change is made in a given copy, it is irreversible
+for that copy, so the ordinary GNU General Public License applies
+to all subsequent copies and derivative works made from that
+copy.
+This option is useful when you wish to copy part of the code
+of the Library into a program that is not a library.
+4. You may copy and distribute the Library (or a portion or derivative
+of it, under Section 2) in object code or executable form under
+the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code,
+which must be distributed under the terms of Sections 1 and 2
+above on a medium customarily used for software interchange.
+If distribution of object code is made by offering access to
+copy from a designated place, then offering equivalent access
+to copy the source code from the same place satisfies the requirement
+to distribute the source code, even though third parties are
+not compelled to copy the source along with the object code.
+5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled
+or linked with it, is called a "work that uses the Library".
+Such a work, in isolation, is not a derivative work of the Library,
+and therefore falls outside the scope of this License.
+However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because
+it contains portions of the Library), rather than a "work that
+uses the library". The executable is therefore covered by this
+License. Section 6 states terms for distribution of such executables.
+When a "work that uses the Library" uses material from a header
+file that is part of the Library, the object code for the work
+may be a derivative work of the Library even though the source
+code is not. Whether this is true is especially significant if
+the work can be linked without the Library, or if the work is
+itself a library. The threshold for this to be true is not precisely
+defined by law.
+If such an object file uses only numerical parameters, data structure
+layouts and accessors, and small macros and small inline functions
+(ten lines or less in length), then the use of the object file
+is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions
+of the Library will still fall under Section 6.)
+Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section
+6. Any executables containing that work also fall under Section
+6, whether or not they are linked directly with the Library itself.
+6. As an exception to the Sections above, you may also combine
+or link a "work that uses the Library" with the Library to produce
+a work containing portions of the Library, and distribute that
+work under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+You must give prominent notice with each copy of the work that
+the Library is used in it and that the Library and its use are
+covered by this License. You must supply a copy of this License.
+If the work during execution displays copyright notices, you
+must include the copyright notice for the Library among them,
+as well as a reference directing the user to the copy of this
+License. Also, you must do one of these things:
+a) Accompany the work with the complete corresponding machine-readable
+source code for the Library including whatever changes were used
+in the work (which must be distributed under Sections 1 and 2
+above); and, if the work is an executable linked with the Library,
+with the complete machine-readable "work that uses the Library",
+as object code and/or source code, so that the user can modify
+the Library and then relink to produce a modified executable
+containing the modified Library. (It is understood that the user
+who changes the contents of definitions files in the Library
+will not necessarily be able to recompile the application to
+use the modified definitions.)
+b) Use a suitable shared library mechanism for linking with the
+Library. A suitable mechanism is one that (1) uses at run time
+a copy of the library already present on the user's computer
+system, rather than copying library functions into the executable,
+and (2) will operate properly with a modified version of the
+library, if the user installs one, as long as the modified version
+is interface-compatible with the version that the work was made
+with.
+c) Accompany the work with a written offer, valid for at least
+three years, to give the same user the materials specified in
+Subsection 6a, above, for a charge no more than the cost of performing
+this distribution.
+d) If distribution of the work is made by offering access to
+copy from a designated place, offer equivalent access to copy
+the above specified materials from the same place.
+e) Verify that the user has already received a copy of these
+materials or that you have already sent this user a copy.
+For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that
+is normally distributed (in either source or binary form) with
+the major components (compiler, kernel, and so on) of the operating
+system on which the executable runs, unless that component itself
+accompanies the executable.
+It may happen that this requirement contradicts the license restrictions
+of other proprietary libraries that do not normally accompany
+the operating system. Such a contradiction means you cannot use
+both them and the Library together in an executable that you
+distribute.
+7. You may place library facilities that are a work based on
+the Library side-by-side in a single library together with other
+library facilities not covered by this License, and distribute
+such a combined library, provided that the separate distribution
+of the work based on the Library and of the other library facilities
+is otherwise permitted, and provided that you do these two things:
+a) Accompany the combined library with a copy of the same work
+based on the Library, uncombined with any other library facilities.
+This must be distributed under the terms of the Sections above.
+b) Give prominent notice with the combined library of the fact
+that part of it is a work based on the Library, and explaining
+where to find the accompanying uncombined form of the same work.
+8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.
+Any attempt otherwise to copy, modify, sublicense, link with,
+or distribute the Library is void, and will automatically terminate
+your rights under this License. However, parties who have received
+copies, or rights, from you under this License will not have
+their licenses terminated so long as such parties remain in full
+compliance.
+9. You are not required to accept this License, since you have
+not signed it. However, nothing else grants you permission to
+modify or distribute the Library or its derivative works. These
+actions are prohibited by law if you do not accept this License.
+Therefore, by modifying or distributing the Library (or any work
+based on the Library), you indicate your acceptance of this License
+to do so, and all its terms and conditions for copying, distributing
+or modifying the Library or works based on it.
+10. Each time you redistribute the Library (or any work based
+on the Library), the recipient automatically receives a license
+from the original licensor to copy, distribute, link with or
+modify the Library subject to these terms and conditions. You
+may not impose any further restrictions on the recipients' exercise
+of the rights granted herein. You are not responsible for enforcing
+compliance by third parties with this License.
+11. If, as a consequence of a court judgment or allegation of
+patent infringement or for any other reason (not limited to patent
+issues), conditions are imposed on you (whether by court order,
+agreement or otherwise) that contradict the conditions of this
+License, they do not excuse you from the conditions of this License.
+If you cannot distribute so as to satisfy simultaneously your
+obligations under this License and any other pertinent obligations,
+then as a consequence you may not distribute the Library at all.
+For example, if a patent license would not permit royalty-free
+redistribution of the Library by all those who receive copies
+directly or indirectly through you, then the only way you could
+satisfy both it and this License would be to refrain entirely
+from distribution of the Library.
+If any portion of this section is held invalid or unenforceable
+under any particular circumstance, the balance of the section
+is intended to apply, and the section as a whole is intended
+to apply in other circumstances.
+It is not the purpose of this section to induce you to infringe
+any patents or other property right claims or to contest validity
+of any such claims; this section has the sole purpose of protecting
+the integrity of the free software distribution system which
+is implemented by public license practices. Many people have
+made generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of
+that system; it is up to the author/donor to decide if he or
+she is willing to distribute software through any other system
+and a licensee cannot impose that choice.
+This section is intended to make thoroughly clear what is believed
+to be a consequence of the rest of this License.
+12. If the distribution and/or use of the Library is restricted
+in certain countries either by patents or by copyrighted interfaces,
+the original copyright holder who places the Library under this
+License may add an explicit geographical distribution limitation
+excluding those countries, so that distribution is permitted
+only in or among countries not thus excluded. In such case, this
+License incorporates the limitation as if written in the body
+of this License.
+13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+Each version is given a distinguishing version number. If the
+Library specifies a version number of this License which applies
+to it and "any later version", you have the option of following
+the terms and conditions either of that version or of any later
+version published by the Free Software Foundation. If the Library
+does not specify a license version number, you may choose any
+version ever published by the Free Software Foundation.
+14. If you wish to incorporate parts of the Library into other
+free programs whose distribution conditions are incompatible
+with these, write to the author to ask for permission. For software
+which is copyrighted by the Free Software Foundation, write to
+the Free Software Foundation; we sometimes make exceptions for
+this. Our decision will be guided by the two goals of preserving
+the free status of all derivatives of our free software and of
+promoting the sharing and reuse of software generally.
+NO WARRANTY
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS
+NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
+LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
+AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
+OR CORRECTION.
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO
+IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
+MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE,
+BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS
+OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED
+BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE
+WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY
+HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+END OF TERMS AND CONDITIONS
+ </license>
+
+ <plugin
+ id="org.jboss.ide.eclipse.archives.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
Property changes on: trunk/archives/features/org.jboss.ide.eclipse.archives.test.feature/feature.xml
___________________________________________________________________
Name: svn:executable
+ *
15 years, 9 months
JBoss Tools SVN: r10340 - trunk/tests/tests.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-09-17 16:13:00 -0400 (Wed, 17 Sep 2008)
New Revision: 10340
Removed:
trunk/tests/tests/org.jboss.ide.eclipse.core.test/
Log:
deleting old test features that no one depends on
15 years, 9 months
JBoss Tools SVN: r10339 - trunk/tests/features.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-09-17 16:12:47 -0400 (Wed, 17 Sep 2008)
New Revision: 10339
Removed:
trunk/tests/features/org.jboss.ide.eclipse.test.feature/
Log:
deleting old test features that no one depends on
15 years, 9 months