JBoss Tools SVN: r19920 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-01-25 17:35:19 -0500 (Mon, 25 Jan 2010)
New Revision: 19920
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4889 JBoss Tools server runtime responds as capable of providing libraries for portlet facets although it doesn't provide them
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2010-01-25 21:27:42 UTC (rev 19919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2010-01-25 22:35:19 UTC (rev 19920)
@@ -13,6 +13,7 @@
org.eclipse.emf.ecore,
org.eclipse.jdt.core,
org.eclipse.wst.common.project.facet.core,
+ org.eclipse.jst.common.project.facet.core,
org.eclipse.jpt.core;bundle-version="[2.2.0,2.2.2)",
org.eclipse.jpt.utility,
org.eclipse.jpt.db
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2010-01-25 21:27:42 UTC (rev 19919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2010-01-25 22:35:19 UTC (rev 19920)
@@ -18,4 +18,25 @@
</listener>
</extension>
+ <extension
+ point="org.eclipse.jst.common.project.facet.core.libraryProviders">
+
+ <provider id="hibernate-user-library-provider" extends="wtp-user-library-provider">
+ <param name="validator" value="org.eclipse.jst.common.project.facet.core.libprov.user.KeyClassesValidator"/>
+ <param name="validator.param.0" value="javax.persistence.Entity"/>
+ <param name="validator.param.1" value="org.hibernate.SessionFactory"/>
+ <enablement>
+ <and>
+ <with variable="requestingProjectFacet">
+ <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+ </with>
+ <with variable="jpaPlatform">
+ <equals value="hibernate"/>
+ </with>
+ </and>
+ </enablement>
+ </provider>
+
+ </extension>
+
</plugin>
15 years, 11 months
JBoss Tools SVN: r19919 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage: src/org/jboss/tools/flow/jpdl4/multipage/validator and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-01-25 16:27:42 -0500 (Mon, 25 Jan 2010)
New Revision: 19919
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
Log:
JBIDE-4904, GPD-373 : Unification of jBPM Preference Pages
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF 2010-01-25 21:24:27 UTC (rev 19918)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF 2010-01-25 21:27:42 UTC (rev 19919)
@@ -12,13 +12,13 @@
org.eclipse.core.resources,
org.eclipse.ui.editors,
org.eclipse.ui.ide,
- org.jboss.tools.flow.jpdl4;bundle-version="1.0.0",
- org.eclipse.wst.sse.ui;bundle-version="1.1.3",
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.4.1",
+ org.jboss.tools.flow.jpdl4,
+ org.eclipse.wst.sse.ui,
+ org.eclipse.ui.views.properties.tabbed,
org.jboss.tools.flow.common,
- org.eclipse.gef;bundle-version="3.4.1",
- org.eclipse.wst.validation;bundle-version="1.2.6",
+ org.eclipse.gef,
+ org.eclipse.wst.validation,
org.jboss.tools.jbpm.common,
- org.eclipse.wst.xml.core;bundle-version="1.1.400"
+ org.eclipse.wst.xml.core
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2010-01-25 21:24:27 UTC (rev 19918)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2010-01-25 21:27:42 UTC (rev 19919)
@@ -36,7 +36,7 @@
clearMarkers((IFile)resource);
ValidationResult validationResult = super.validate(resource, kind, state, monitor);
if (!(resource instanceof IFile) || resource == null) return validationResult;
- PreferencesManager manager = PreferencesManager.getPreferencesManager(Activator.getDefault());
+ PreferencesManager manager = PreferencesManager.INSTANCE;
if (manager == null) return validationResult;
String jbpmName = Activator.getDefault().getPluginPreferences().getString(Constants.JBPM_NAME);
if (jbpmName == null) return validationResult;
15 years, 11 months
JBoss Tools SVN: r19918 - in trunk/jbpm/plugins/org.jbpm.gd.jpdl: src/org/jbpm/gd/jpdl/prefs and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-01-25 16:24:27 -0500 (Mon, 25 Jan 2010)
New Revision: 19918
Removed:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/AddJbpmInstallationDialog.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallation.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationLabelProvider.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationTableContentProvider.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmLocationsPage.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationElementLabelProvider.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationTableContentProvider.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/PreferencesManager.java
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainer.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/VariableTableItemWrapper.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/ConfigureRuntimePage.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java
Log:
JBIDE-4904, GPD-373 : Unification of jBPM Preference Pages
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-01-25 21:24:27 UTC (rev 19918)
@@ -350,11 +350,6 @@
name="jBPM 3"
category="org.jboss.tools.jbpm"/>
<page
- class="org.jbpm.gd.jpdl.prefs.JbpmLocationsPage"
- id="org.jbpm.gd.jpdl.prefs.jbpmLocations"
- name="Runtime Locations"
- category="org.jbpm.gd.jpdl.prefs.jbpm3"/>
- <page
class="org.jbpm.gd.jpdl.prefs.AssignmentTypesPage"
id="org.jbpm.gd.jpdl.prefs.assignmentTypes"
name="Assignment Types"
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/AddJbpmInstallationDialog.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/AddJbpmInstallationDialog.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/AddJbpmInstallationDialog.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,250 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-
-import java.io.File;
-import java.net.MalformedURLException;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.io.SAXReader;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.jbpm.gd.jpdl.Plugin;
-
-public class AddJbpmInstallationDialog extends StatusDialog {
-
- private static final String pluginId = Plugin.getDefault().getBundle().getSymbolicName();
-
- private static final IStatus enterNameStatus = new Status(
- Status.INFO, pluginId, 0, "Enter the name of the jBPM installation.", null);
- private static final IStatus enterLocationStatus = new Status(
- Status.INFO, pluginId, 0, "Enter the location of the jBPM installation.", null);
- private static final IStatus unExistingLocationStatus = new Status(
- Status.ERROR, pluginId, 0, "The location does not exist.", null);
- private static final IStatus nameAlreadyUsedStatus = new Status(
- Status.ERROR, pluginId, 0, "The name is already used.", null);
- private static final IStatus inValidJbpmInstallationStatus = new Status(
- Status.ERROR, pluginId, 0, "This is not a valid jBPM installation.", null);
-
- String title;
- Text nameText, locationText;
- Button locationButton;
-
- IStatus currentStatus = enterNameStatus;
-
- String name, location;
- IStatus status;
-
- public AddJbpmInstallationDialog(Shell parentShell) {
- super(parentShell);
- }
-
- public void initialize(String t, String n, String l) {
- this.title = t;
- this.name = n;
- this.location = l;
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite area = (Composite)super.createDialogArea(parent);
- getShell().setText(title);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- area.setLayout(gridLayout);
- createNameLabel(area);
- createNameText(area);
- createFillLabel(area);
- createLocationLabel(area);
- createLocationText(area);
- createLocationButton(area);
- getShell().setText(title);
- return area;
- }
-
- protected Control createContents(Composite parent) {
- Control result = super.createContents(parent);
- updateStatus(currentStatus);
- return result;
- }
-
- private void createLocationText(Composite area) {
- locationText = new Text(area, SWT.BORDER);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = convertWidthInCharsToPixels(40);
- locationText.setLayoutData(gridData);
- locationText.setText(location == null ? "" : location);
- locationText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- handleLocationChanged();
- }
- });
- }
-
- private void handleLocationChanged() {
- location = locationText.getText();
- updateCurrentStatus();
- updateStatus(currentStatus);
- }
-
- private void createLocationButton(Composite area) {
- locationButton = new Button(area, SWT.PUSH);
- locationButton.setText("Search...");
- locationButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchLocation();
- }
- });
- }
-
- private void searchLocation() {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
- String result = dialog.open();
- if (result != null) {
- locationText.setText(result);
- }
- }
-
- private void createLocationLabel(Composite area) {
- Label label = new Label(area, SWT.NONE);
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- label.setLayoutData(gridData);
- label.setText("Location :");
- }
-
- private void createFillLabel(Composite area) {
- new Label(area, SWT.NONE);
- }
-
- private void createNameText(Composite area) {
- nameText = new Text(area, SWT.BORDER);
- GridData gridData = new GridData();
- gridData.verticalIndent = 10;
- gridData.widthHint = convertWidthInCharsToPixels(40);
- nameText.setLayoutData(gridData);
- nameText.setText(name == null ? "" : name);
- nameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- handleNameChanged();
- }
- });
- }
-
- private void handleNameChanged() {
- name = nameText.getText();
- updateCurrentStatus();
- updateStatus(currentStatus);
- }
-
- private void updateCurrentStatus() {
- if (isNameEmpty() && isLocationEmpty()) {
- currentStatus = enterNameStatus;
- } else if (isNameAlreadyUsed() && !"Edit Location".equals(title)) {
- currentStatus = nameAlreadyUsedStatus;
- } else if (isLocationEmpty()) {
- currentStatus = enterLocationStatus;
- } else if (!isLocationExisting()) {
- currentStatus = unExistingLocationStatus;
- } else if (!isValidJbpmInstallation()) {
- currentStatus = inValidJbpmInstallationStatus;
- } else if (isNameEmpty()) {
- currentStatus = enterNameStatus;
- } else {
- currentStatus = Status.OK_STATUS;
- }
- }
-
- private boolean isNameAlreadyUsed() {
- return PreferencesManager.INSTANCE.getJbpmInstallation(nameText.getText()) != null;
- }
-
- private boolean isLocationExisting() {
- return new Path(location).toFile().exists();
- }
-
- private boolean isNameEmpty() {
- return name == null || "".equals(name);
- }
-
- private boolean isLocationEmpty() {
- return location == null || "".equals(location);
- }
-
- private boolean isValidJbpmInstallation() {
- return getJbpmVersionInfoFile().exists();
- }
-
- private File getJbpmVersionInfoFile() {
- return new Path(location).append("/src/resources/gpd/version.info.xml").toFile();
- }
-
- protected void updateButtonsEnableState(IStatus status) {
- Button ok = getButton(IDialogConstants.OK_ID);
- if (ok != null && !ok.isDisposed())
- ok.setEnabled(status.getSeverity() == IStatus.OK);
- }
-
- private void createNameLabel(Composite area) {
- Label label = new Label(area, SWT.NONE);
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- label.setLayoutData(gridData);
- label.setText("Name :");
- }
-
- public String getName() {
- return name;
- }
-
- public String getLocation() {
- return location;
- }
-
- public String getVersion() {
- String result = "3.1";
- try {
- Document document = new SAXReader().read(getJbpmVersionInfoFile());
- result = document.getRootElement().attribute("name").getValue();
- }
- catch (DocumentException e) {}
- catch (MalformedURLException e) {}
- return result;
- }
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallation.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallation.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallation.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-public class JbpmInstallation {
-
- public String location;
- public String version;
- public String name;
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationLabelProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationLabelProvider.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationLabelProvider.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class JbpmInstallationLabelProvider extends LabelProvider implements
- ITableLabelProvider {
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- JbpmInstallation installation = (JbpmInstallation)element;
- switch (columnIndex) {
- case 0: return installation.name;
- case 1: return installation.version;
- case 2: return installation.location;
- default: return null;
- }
- }
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationTableContentProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationTableContentProvider.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmInstallationTableContentProvider.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class JbpmInstallationTableContentProvider implements IStructuredContentProvider {
-
- PreferencesManager inputManager;
-
- public Object[] getElements(Object inputElement) {
- return inputManager.getJbpmInstallationMap().values().toArray();
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- inputManager = (PreferencesManager)newInput;
- }
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmLocationsPage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmLocationsPage.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/JbpmLocationsPage.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,327 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.jboss.tools.jbpm.util.AutoResizeTableLayout;
-import org.jbpm.gd.jpdl.Constants;
-import org.jbpm.gd.jpdl.Plugin;
-
-public class JbpmLocationsPage extends PreferencePage implements IWorkbenchPreferencePage, Constants {
-
- private TableViewer tableViewer;
- private Button addButton, editButton, removeButton;
-
- public JbpmLocationsPage() {
- super();
- setPreferenceStore(Plugin.getDefault().getPreferenceStore());
- }
-
- protected Control createContents(Composite parent) {
- Composite clientArea = createClientArea(parent);
- createLabels(clientArea);
- createJbpmHomeListTable(clientArea);
- createButtons(clientArea);
- return null;
- }
-
- private void createButtons(Composite parent) {
- GridData gridData = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- gridData.widthHint = 80;
- addButton = new Button(parent, SWT.PUSH);
- addButton.setText("Add...");
- addButton.setLayoutData(gridData);
- addButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- addNewLocation();
- }
- });
- editButton = new Button(parent, SWT.PUSH);
- editButton.setText("Edit...");
- editButton.setLayoutData(gridData);
- editButton.setEnabled(false);
- editButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- editLocation();
- }
- });
- removeButton = new Button(parent, SWT.PUSH);
- removeButton.setText("Remove");
- removeButton.setLayoutData(gridData);
- removeButton.setEnabled(false);
- removeButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- removeLocation();
- }
- });
- }
-
- private void removeLocation() {
- TableItem item = tableViewer.getTable().getSelection()[0];
- String name = item.getText(0);
- PreferencesManager inputManager =
- (PreferencesManager)tableViewer.getInput();
- JbpmInstallation installation = inputManager.getJbpmInstallation(name);
- inputManager.getJbpmInstallationMap().remove(name);
- tableViewer.remove(installation);
- updateButtons();
- updateStatus();
- }
-
- private void editLocation() {
- TableItem item = tableViewer.getTable().getSelection()[0];
- String name = item.getText(0);
- PreferencesManager inputManager =
- (PreferencesManager)tableViewer.getInput();
- JbpmInstallation jbpmInstallation = inputManager.getJbpmInstallation(name);
- AddJbpmInstallationDialog dialog = new AddJbpmInstallationDialog(getShell());
- dialog.initialize("Edit Location", jbpmInstallation.name, jbpmInstallation.location);
- if (dialog.open() == IDialogConstants.OK_ID) {
- jbpmInstallation.name = dialog.getName();
- jbpmInstallation.version = dialog.getVersion();
- jbpmInstallation.location = dialog.getLocation();
- tableViewer.update(jbpmInstallation, null);
- if (name != dialog.getName()) {
- inputManager.getJbpmInstallationMap().remove(name);
- inputManager.getJbpmInstallationMap().put(dialog.getName(), jbpmInstallation);
- }
- }
- updateButtons();
- }
-
- private void addNewLocation() {
- AddJbpmInstallationDialog dialog = new AddJbpmInstallationDialog(getShell());
- dialog.initialize("Add Location", "", "");
- if (dialog.open() == IDialogConstants.OK_ID) {
- PreferencesManager inputManager =
- (PreferencesManager)tableViewer.getInput();
- JbpmInstallation jbpmInstallation = getJbpmInstallation(dialog);
- inputManager.getJbpmInstallationMap().put(jbpmInstallation.name, jbpmInstallation);
- tableViewer.add(jbpmInstallation);
- }
- updateButtons();
- }
-
- private JbpmInstallation getJbpmInstallation(AddJbpmInstallationDialog dialog) {
- JbpmInstallation jbpmInstallation = new JbpmInstallation();
- jbpmInstallation.name = dialog.getName();
- jbpmInstallation.location = dialog.getLocation();
- jbpmInstallation.version = dialog.getVersion();
- return jbpmInstallation;
- }
-
- private Composite createClientArea(Composite parent) {
- Composite clientArea = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- clientArea.setLayout(layout);
- GridData gridData = new GridData(GridData.FILL_BOTH);
- clientArea.setLayoutData(gridData);
- return clientArea;
- }
-
- public void init(IWorkbench workbench) {
- }
-
- private void createJbpmHomeListTable(Composite parent) {
- tableViewer = new TableViewer(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.CHECK);
- tableViewer.setContentProvider(new JbpmInstallationTableContentProvider());
- tableViewer.setLabelProvider(new JbpmInstallationLabelProvider());
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.verticalSpan = 3;
- gridData.heightHint = 200;
- tableViewer.getControl().setLayoutData(gridData);
- initializeTable(tableViewer);
- createTableColumns(tableViewer);
- initializeInput(tableViewer);
- }
-
- private void initializeInput(TableViewer viewer) {
- viewer.setInput(PreferencesManager.INSTANCE);
- checkItemToCheck(viewer);
- }
-
- private void checkItemToCheck(TableViewer viewer) {
- String name = getPreferences().getString(JBPM_NAME);
- if (name != null) {
- TableItem tableItem = getItemToCheck(viewer, name);
- if (tableItem != null) {
- tableItem.setChecked(true);
- }
- }
- }
-
- private TableItem getItemToCheck(TableViewer viewer, String name) {
- TableItem[] items = viewer.getTable().getItems();
- for (int i = 0; i < items.length; i++) {
- if (name.equals(items[i].getText(0))) return items[i];
- }
- return null;
- }
-
- private void createTableColumns(TableViewer viewer) {
- Table table = viewer.getTable();
- TableColumn nameColumn = new TableColumn(table, SWT.LEFT);
- nameColumn.setText("Name");
- ColumnWeightData nameColumnData = new ColumnWeightData(30);
- AutoResizeTableLayout layout = (AutoResizeTableLayout)table.getLayout();
- layout.addColumnData(nameColumnData);
- TableColumn versionColumn = new TableColumn(table, SWT.LEFT);
- versionColumn.setText("Version");
- ColumnWeightData versionColumnData = new ColumnWeightData(30);
- layout.addColumnData(versionColumnData);
- TableColumn locationColumn = new TableColumn(table, SWT.LEFT);
- locationColumn.setText("Location");
- ColumnWeightData locationColumnData = new ColumnWeightData(40);
- layout.addColumnData(locationColumnData);
- }
-
- private void initializeTable(TableViewer viewer) {
- Table table = viewer.getTable();
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- table.setLayout(new AutoResizeTableLayout(table));
- table.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateSelection(e);
- }
- });
- }
-
- private void updateSelection(SelectionEvent e) {
- if (e.detail == SWT.CHECK) {
- updateChecks(e);
- } else {
- updateButtons();
- }
- updateStatus();
- }
-
- private void updateChecks(SelectionEvent e) {
- Table table = tableViewer.getTable();
- TableItem[] items = table.getItems();
- for (int i = 0; i < items.length; i++) {
- if (e.item != items[i]) {
- items[i].setChecked(false);
- }
- }
- }
-
- private void updateStatus() {
- TableItem item = getCheckedItem();
- if (item != null) {
- setErrorMessage(null);
- setValid(true);
- } else {
- setErrorMessage("Select a default jBPM installation.");
- setValid(false);
- }
- }
-
- private TableItem getCheckedItem() {
- TableItem[] items = tableViewer.getTable().getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getChecked()) {
- return items[i];
- }
- }
- return null;
- }
-
- private void updateButtons() {
- Table table = tableViewer.getTable();
- TableItem[] selection = table.getSelection();
- editButton.setEnabled(selection.length == 1);
- removeButton.setEnabled(selection.length == 1 && table.getItemCount() > 1);
- }
-
- private void createLabels(Composite parent) {
- GridData infoLabelGridData = new GridData(GridData.FILL_HORIZONTAL);
- infoLabelGridData.horizontalSpan = 2;
- Label infoLabel = new Label(parent, SWT.NONE);
- infoLabel.setText(
- "Add, remove or edit JBoss jBPM installation locations.\n" +
- "The checked location will be used by the jBPM creation wizards.");
- infoLabel.setLayoutData(infoLabelGridData);
- GridData tableLabelGridData = new GridData(SWT.BEGINNING, SWT.END, false, false);
- tableLabelGridData.horizontalSpan = 2;
- Label tableLabel = new Label(parent, SWT.NONE);
- tableLabel.setText("jBPM Installation Locations:");
- tableLabel.setLayoutData(tableLabelGridData);
- }
-
- public boolean performOk() {
- String name = "";
- PreferencesManager inputManager =
- (PreferencesManager)tableViewer.getInput();
- inputManager.saveInstallations();
- TableItem item = getCheckedItem(tableViewer);
- if (item != null) {
- name = item.getText(0);
- }
- getPreferences().setValue(JBPM_NAME, name);
- return true;
- }
-
- private TableItem getCheckedItem(TableViewer viewer) {
- TableItem[] items = viewer.getTable().getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getChecked()) return items[i];
- }
- return null;
- }
-
- public void performDefaults() {
- getPreferences().setToDefault(JBPM_NAME);
- PreferencesManager inputManager =
- (PreferencesManager)tableViewer.getInput();
- inputManager.getJbpmInstallationMap().clear();
- tableViewer.setInput(inputManager);
- checkItemToCheck(tableViewer);
- setMessage("");
- updateButtons();
- setValid(true);
- }
-
- private Preferences getPreferences() {
- return Plugin.getDefault().getPluginPreferences();
- }
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationElementLabelProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationElementLabelProvider.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationElementLabelProvider.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-import java.util.Map;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class LocationElementLabelProvider extends LabelProvider implements
- ITableLabelProvider {
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- JbpmInstallation installation = (JbpmInstallation)((Map.Entry)element).getValue();
- switch (columnIndex) {
- case 0: return installation.name;
- case 1: return installation.version;
- case 2: return installation.location;
- default: return null;
- }
- }
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationTableContentProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationTableContentProvider.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/LocationTableContentProvider.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class LocationTableContentProvider implements IStructuredContentProvider {
-
- PreferencesManager inputManager;
-
- public Object[] getElements(Object inputElement) {
- return inputManager.getJbpmInstallationMap().values().toArray();
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- inputManager = (PreferencesManager)newInput;
- }
-
-}
Deleted: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/PreferencesManager.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/PreferencesManager.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/PreferencesManager.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -1,176 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.gd.jpdl.prefs;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-import org.jbpm.gd.jpdl.Constants;
-import org.jbpm.gd.jpdl.Plugin;
-
-public class PreferencesManager implements Constants {
-
- public static final PreferencesManager INSTANCE = new PreferencesManager();
-
- private Map jbpmInstallations = null;
- private File installationsFile = null;
-
- private PreferencesManager() {
- initializeInstallations();
- }
-
- private File getInstallationFile() {
- if (installationsFile == null) {
- initializeInstallations();
- }
- return installationsFile;
- }
-
- private Map getJbpmInstallations() {
- if (jbpmInstallations == null) {
- jbpmInstallations = new HashMap();
- }
- return jbpmInstallations;
- }
-
- private static Preferences getPreferences() {
- return Plugin.getDefault().getPluginPreferences();
- }
-
- private void initializeInstallations() {
- installationsFile =
- Plugin.getDefault().getStateLocation().append("jbpm-installations.xml").toFile();
- if (!installationsFile.exists()) {
- createInstallationsFile();
- } else {
- loadInstallations();
- }
- }
-
- private void createInstallationsFile() {
- try {
- installationsFile.createNewFile();
- saveInstallations();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private void loadInstallations() {
- Reader reader = null;
- try {
- reader = new FileReader(getInstallationFile());
- XMLMemento memento = XMLMemento.createReadRoot(reader);
- IMemento[] children = memento.getChildren("installation");
- for (int i = 0; i < children.length; i++) {
- JbpmInstallation installation = new JbpmInstallation();
- installation.name = children[i].getString("name");
- installation.location = children[i].getString("location");
- installation.version = children[i].getString("version");
- getJbpmInstallations().put(installation.name, installation);
- }
- } catch (WorkbenchException e) {
- e.printStackTrace();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } finally {
- try {
- if (reader != null) {
- reader.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- public void saveInstallations() {
- XMLMemento memento = XMLMemento.createWriteRoot("installations");
- Iterator iterator = getJbpmInstallations().keySet().iterator();
- while (iterator.hasNext()) {
- String name = (String)iterator.next();
- JbpmInstallation installation = (JbpmInstallation)getJbpmInstallations().get(name);
- IMemento child = memento.createChild("installation");
- child.putString("name", installation.name);
- child.putString("location", installation.location);
- child.putString("version", installation.version);
- }
- FileWriter writer = null;
- try {
- writer = new FileWriter(getInstallationFile());
- memento.save(writer);
- } catch (IOException e) {
- e.printStackTrace();
- }
- finally {
- try {
- if (writer != null) {
- writer.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- public Map getJbpmInstallationMap() {
- return getJbpmInstallations();
- }
-
- public JbpmInstallation getJbpmInstallation(String name) {
- return (JbpmInstallation)getJbpmInstallations().get(name);
- }
-
- public String getPreferredJbpmName() {
- return getPreferences().getString(JBPM_NAME);
- }
-
- public void setPreferredJbpmName(String name) {
- getPreferences().setDefault(JBPM_NAME, name);
- }
-
- public void addJbpmInstallation(String name, String location, String version) {
- JbpmInstallation installation = new JbpmInstallation();
- installation.name = name;
- installation.location = location;
- installation.version = version;
- getJbpmInstallationMap().put(name, installation);
- }
-
- public void initializeDefaultJbpmInstallation(String name, String location, String version) {
- setPreferredJbpmName(name);
- addJbpmInstallation(name, location, version);
- saveInstallations();
- }
-
-}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -161,7 +161,7 @@
passwordText.setText(null);
getPreferenceStore().setValue("server name", "localhost");
getPreferenceStore().setValue("server port", "8080");
- getPreferenceStore().setValue("server deployer", "jbpm-console/upload");
+ getPreferenceStore().setValue("server deployer", "/jbpm-console/upload");
getPreferenceStore().setValue("use credentials", false);
getPreferenceStore().setValue("user name", "");
getPreferenceStore().setValue("password", "");
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainer.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainer.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainer.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -41,9 +41,9 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.jboss.tools.jbpm.preferences.JbpmInstallation;
import org.jbpm.gd.jpdl.Constants;
import org.jbpm.gd.jpdl.Logger;
-import org.jbpm.gd.jpdl.prefs.JbpmInstallation;
public class JbpmClasspathContainer implements IClasspathContainer, Constants {
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -27,9 +27,9 @@
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.jboss.tools.jbpm.preferences.JbpmInstallation;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
-import org.jbpm.gd.jpdl.prefs.JbpmInstallation;
-import org.jbpm.gd.jpdl.prefs.PreferencesManager;
public class JbpmClasspathContainerInitializer extends
ClasspathContainerInitializer {
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/VariableTableItemWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/VariableTableItemWrapper.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/VariableTableItemWrapper.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -153,6 +153,7 @@
private void applyMappedName() {
mappedNameText.setVisible(false);
+ variable.setMappedName(mappedNameText.getText());
tableItem.setText(2, getMappedName());
}
@@ -162,6 +163,7 @@
private void applyName() {
nameText.setVisible(false);
+ variable.setName(nameText.getText());
tableItem.setText(1, getName());
}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/ConfigureRuntimePage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/ConfigureRuntimePage.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/ConfigureRuntimePage.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -22,11 +22,7 @@
package org.jbpm.gd.jpdl.wizard;
import java.io.File;
-import java.net.MalformedURLException;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.io.SAXReader;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -47,13 +43,13 @@
public class ConfigureRuntimePage extends WizardPage {
- private static final String ENTER_NAME_MSG = "Choose a name for the JBoss jBPM Runtime, e.g. 'jBPM jPDL 3.2.2'";
- private static final String ENTER_LOCATION_MSG = "Enter or search a location for the JBoss jBPM Runtime";
+ private static final String ENTER_NAME_MSG = "Choose a name for the jBPM 3 Runtime, e.g. 'jBPM jPDL 3.2.2'";
+ private static final String ENTER_LOCATION_MSG = "Enter or search a location for the jBPM 3 Runtime";
private static final String CONTINUE_MSG = "Press next to continue the project creation";
private static final String UNEXISTING_LOCATION_MSG = "This location does not exist";
- private static final String INVALID_LOCATION_MSG = "This location does not contain a valid JBoss jBPM runtime, please retry";
+ private static final String INVALID_LOCATION_MSG = "This location does not contain a valid jBPM 3 runtime, please retry";
- Text nameText, locationText, versionText;
+ Text nameText, locationText;
public ConfigureRuntimePage() {
super("Configure JBoss jBPM Runtime");
@@ -71,12 +67,11 @@
private void update() {
updateMessage();
- updateVersion();
updatePages();
}
private void updatePages() {
- setPageComplete(!isNameEmpty() && !isLocationEmpty() && !isVersionEmpty());
+ setPageComplete(!isNameEmpty() && !isLocationEmpty());
if (!isNameEmpty()) {
NewProcessProjectDetailsWizardPage page = (NewProcessProjectDetailsWizardPage)getNextPage();
page.combo.removeAll();
@@ -113,17 +108,8 @@
group.setLayoutData(gridData);
createJbpmRuntimeNameField(group);
createJbpmRuntimeLocationField(group);
- createJbpmRuntimeVersionField(group);
}
- private void createJbpmRuntimeVersionField(Composite composite) {
- Label versionLabel = new Label(composite, SWT.NONE);
- versionLabel.setText("Version :");
- versionText = new Text(composite, SWT.BORDER);
- versionText.setEditable(false);
- versionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
private void createJbpmRuntimeNameField(Composite composite) {
Label nameLabel = new Label(composite, SWT.NONE);
nameLabel.setText("Name :");
@@ -182,7 +168,7 @@
setMessage(ENTER_LOCATION_MSG);
} else if (!isLocationExisting()) {
setErrorMessage(UNEXISTING_LOCATION_MSG);
- } else if (!isValidJbpmInstallation()) {
+ } else if (!isValidJbpm3Installation()) {
setErrorMessage(INVALID_LOCATION_MSG);
} else if (isNameEmpty()) {
setMessage(ENTER_NAME_MSG);
@@ -191,29 +177,6 @@
}
}
- private void updateVersion() {
- String version = getVersion();
- if (version != null) {
- versionText.setText(version);
- }
- }
-
- private String getVersion() {
- String result = null;
- File versionInfoFile;
- if (!isLocationEmpty() && isLocationExisting() && isValidJbpmInstallation()) {
- versionInfoFile = getJbpmVersionInfoFile();
- if (versionInfoFile == null) return result;
- try {
- Document document = new SAXReader().read(versionInfoFile);
- result = document.getRootElement().attribute("name").getValue();
- }
- catch (DocumentException e) {}
- catch (MalformedURLException e) {}
- }
- return result;
- }
-
private boolean isNameEmpty() {
String text = nameText.getText();
return text == null || "".equals(text);
@@ -224,16 +187,11 @@
return text == null || "".equals(text);
}
- private boolean isVersionEmpty() {
- String text = versionText.getText();
- return text == null || "".equals(text);
- }
-
private boolean isLocationExisting() {
return new Path(locationText.getText()).toFile().exists();
}
- private boolean isValidJbpmInstallation() {
+ private boolean isValidJbpm3Installation() {
return getJbpmVersionInfoFile().exists();
}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -47,10 +47,10 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
+import org.jboss.tools.jbpm.preferences.JbpmInstallation;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
import org.jbpm.gd.jpdl.Plugin;
-import org.jbpm.gd.jpdl.prefs.JbpmInstallation;
-import org.jbpm.gd.jpdl.prefs.PreferencesManager;
public class NewProcessDefinitionWizard extends Wizard implements INewWizard {
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -22,6 +22,7 @@
package org.jbpm.gd.jpdl.wizard;
import java.util.Iterator;
+import java.util.Map;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -33,7 +34,8 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
-import org.jbpm.gd.jpdl.prefs.PreferencesManager;
+import org.jboss.tools.jbpm.preferences.JbpmInstallation;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
public class NewProcessProjectDetailsWizardPage extends WizardPage {
@@ -89,14 +91,18 @@
}
private void fillComboWithPreferenceRuntimes() {
- Iterator iterator = PreferencesManager.INSTANCE.getJbpmInstallationMap().keySet().iterator();
+ Map<String, JbpmInstallation> installations = PreferencesManager.INSTANCE.getJbpmInstallationMap();
+ Iterator<String> iterator = installations.keySet().iterator();
int counter = 0;
while (iterator.hasNext()) {
- counter++;
- String next = (String)iterator.next();
- combo.add(next);
- if (PreferencesManager.INSTANCE.getPreferredJbpmName().equals(next)) {
- combo.select(counter - 1);
+ String next = iterator.next();
+ JbpmInstallation installation = installations.get(next);
+ if ("jBPM3".equals(installation.version)) {
+ counter++;
+ combo.add(next);
+ if (PreferencesManager.INSTANCE.getPreferredJbpmName().equals(next)) {
+ combo.select(counter - 1);
+ }
}
}
}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java 2010-01-25 21:23:54 UTC (rev 19917)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java 2010-01-25 21:24:27 UTC (rev 19918)
@@ -32,6 +32,7 @@
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import org.dom4j.Document;
import org.dom4j.DocumentException;
@@ -82,9 +83,9 @@
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.eclipse.ui.part.ISetSelectionTarget;
+import org.jboss.tools.jbpm.preferences.JbpmInstallation;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
-import org.jbpm.gd.jpdl.prefs.JbpmInstallation;
-import org.jbpm.gd.jpdl.prefs.PreferencesManager;
import org.jbpm.gd.jpdl.util.JbpmClasspathContainer;
public class NewProcessProjectWizard extends Wizard implements INewWizard {
@@ -107,14 +108,22 @@
public void addPages() {
addMainPage();
- if (!isRuntimeAvailable()) {
+ if (!isJbpm3RuntimeAvailable()) {
addConfigureRuntimePage();
}
addChooseRuntimePage();
}
- private boolean isRuntimeAvailable() {
- return !PreferencesManager.INSTANCE.getJbpmInstallationMap().isEmpty();
+ private boolean isJbpm3RuntimeAvailable() {
+ Map<String, JbpmInstallation> installations = PreferencesManager.INSTANCE.getJbpmInstallationMap();
+ Iterator<String> iterator = installations.keySet().iterator();
+ while (iterator.hasNext()) {
+ JbpmInstallation installation = installations.get(iterator.next());
+ if ("jBPM3".equals(installation.version)) {
+ return true;
+ }
+ }
+ return false;
}
private void addConfigureRuntimePage() {
@@ -427,10 +436,10 @@
}
public boolean performFinish() {
- if (!isRuntimeAvailable()) {
+ if (!isJbpm3RuntimeAvailable()) {
String name = configureRuntimePage.nameText.getText();
String location = configureRuntimePage.locationText.getText();
- String version = configureRuntimePage.versionText.getText();
+ String version = "jBPM3";
PreferencesManager.INSTANCE.initializeDefaultJbpmInstallation(name, location, version);
}
getContainer().updateButtons();
15 years, 11 months
JBoss Tools SVN: r19917 - in trunk/jbpm/plugins/org.jboss.tools.jbpm.common: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-01-25 16:23:54 -0500 (Mon, 25 Jan 2010)
New Revision: 19917
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmInstallationLabelProvider.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/LocationElementLabelProvider.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
Log:
JBIDE-4904, GPD-373 : Unification of jBPM Preference Pages
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF 2010-01-25 21:23:54 UTC (rev 19917)
@@ -15,3 +15,5 @@
org.jboss.tools.jbpm.java,
org.jboss.tools.jbpm.preferences,
org.jboss.tools.jbpm.util
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.jboss.tools.jbpm.Activator
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/plugin.xml 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/plugin.xml 2010-01-25 21:23:54 UTC (rev 19917)
@@ -24,4 +24,13 @@
</category>
</extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.jboss.tools.jbpm.preferences.JbpmLocationsPage"
+ id="org.jboss.tools.jbpm.locations"
+ name="Runtime Locations"
+ category="org.jboss.tools.jbpm"/>
+ </extension>
+
</plugin>
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2010-01-25 21:23:54 UTC (rev 19917)
@@ -30,7 +30,7 @@
}
public PreferencesManager getPreferencesManager() {
- return PreferencesManager.getPreferencesManager(this);
+ return PreferencesManager.INSTANCE;
}
public void start(BundleContext context) throws Exception {
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2010-01-25 21:23:54 UTC (rev 19917)
@@ -43,7 +43,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-public abstract class AddJbpmInstallationDialog extends StatusDialog {
+public class AddJbpmInstallationDialog extends StatusDialog {
private static final String ENTER_NAME = "Enter the name of the jBPM installation.";
private static final String ENTER_LOCATION = "Enter the location of the jBPM installation.";
@@ -185,7 +185,7 @@
}
private boolean isNameAlreadyUsed() {
- return PreferencesManager.getPreferencesManager(plugin).getJbpmInstallation(nameText.getText()) != null;
+ return PreferencesManager.INSTANCE.getJbpmInstallation(nameText.getText()) != null;
}
private boolean isLocationExisting() {
@@ -221,7 +221,25 @@
return location;
}
- protected abstract String getVersion();
- protected abstract boolean isValidJbpmInstallation();
+ private boolean isJbpm3() {
+ return new Path(location).append("/src/resources/gpd/version.info.xml").toFile().exists();
+ }
+
+ private boolean isJbpm4() {
+ return new Path(getLocation()).append("/jbpm.jar").toFile().exists();
+ }
+
+ protected String getVersion() {
+ if (isJbpm3()) {
+ return "jBPM3";
+ } else if (isJbpm4()) {
+ return "jBPM4";
+ } else {
+ return "unknown";
+ }
+ }
+ protected boolean isValidJbpmInstallation() {
+ return isJbpm3() || isJbpm4();
+ }
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmInstallationLabelProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmInstallationLabelProvider.java 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmInstallationLabelProvider.java 2010-01-25 21:23:54 UTC (rev 19917)
@@ -36,8 +36,7 @@
JbpmInstallation installation = (JbpmInstallation)element;
switch (columnIndex) {
case 0: return installation.name;
- case 1: return installation.version;
- case 2: return installation.location;
+ case 1: return installation.location;
default: return null;
}
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2010-01-25 21:23:54 UTC (rev 19917)
@@ -40,24 +40,23 @@
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.jbpm.Activator;
import org.jboss.tools.jbpm.Constants;
import org.jboss.tools.jbpm.util.AutoResizeTableLayout;
-public abstract class JbpmLocationsPage extends PreferencePage implements IWorkbenchPreferencePage {
+public class JbpmLocationsPage extends PreferencePage implements IWorkbenchPreferencePage {
private TableViewer tableViewer;
private Button addButton, editButton, removeButton;
- private AbstractUIPlugin plugin;
-
- public JbpmLocationsPage(AbstractUIPlugin plugin) {
+ public JbpmLocationsPage() {
super();
- this.plugin = plugin;
- setPreferenceStore(plugin.getPreferenceStore());
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
}
- protected abstract AddJbpmInstallationDialog createAddJbpmInstallationDialog(Shell shell);
+ protected AddJbpmInstallationDialog createAddJbpmInstallationDialog(Shell shell) {
+ return new AddJbpmInstallationDialog(shell, Activator.getDefault());
+ }
protected Control createContents(Composite parent) {
Composite clientArea = createClientArea(parent);
@@ -179,12 +178,12 @@
}
private void initializeInput(TableViewer viewer) {
- viewer.setInput(PreferencesManager.getPreferencesManager(plugin));
+ viewer.setInput(PreferencesManager.INSTANCE);
checkItemToCheck(viewer);
}
private void checkItemToCheck(TableViewer viewer) {
- String name = plugin.getPreferenceStore().getString(Constants.JBPM_NAME);
+ String name = Activator.getDefault().getPreferenceStore().getString(Constants.JBPM_NAME);
if (name != null) {
TableItem tableItem = getItemToCheck(viewer, name);
if (tableItem != null) {
@@ -208,13 +207,9 @@
ColumnWeightData nameColumnData = new ColumnWeightData(30);
AutoResizeTableLayout layout = (AutoResizeTableLayout)table.getLayout();
layout.addColumnData(nameColumnData);
- TableColumn versionColumn = new TableColumn(table, SWT.LEFT);
- versionColumn.setText("Version");
- ColumnWeightData versionColumnData = new ColumnWeightData(30);
- layout.addColumnData(versionColumnData);
TableColumn locationColumn = new TableColumn(table, SWT.LEFT);
locationColumn.setText("Location");
- ColumnWeightData locationColumnData = new ColumnWeightData(40);
+ ColumnWeightData locationColumnData = new ColumnWeightData(70);
layout.addColumnData(locationColumnData);
}
@@ -301,7 +296,7 @@
if (item != null) {
name = item.getText(0);
}
- plugin.getPluginPreferences().setValue(Constants.JBPM_NAME, name);
+ Activator.getDefault().getPluginPreferences().setValue(Constants.JBPM_NAME, name);
return true;
}
@@ -314,7 +309,7 @@
}
public void performDefaults() {
- plugin.getPluginPreferences().setToDefault(Constants.JBPM_NAME);
+ Activator.getDefault().getPluginPreferences().setToDefault(Constants.JBPM_NAME);
PreferencesManager inputManager =
(PreferencesManager)tableViewer.getInput();
inputManager.getJbpmInstallationMap().clear();
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/LocationElementLabelProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/LocationElementLabelProvider.java 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/LocationElementLabelProvider.java 2010-01-25 21:23:54 UTC (rev 19917)
@@ -39,8 +39,7 @@
JbpmInstallation installation = (JbpmInstallation)((Map.Entry)element).getValue();
switch (columnIndex) {
case 0: return installation.name;
- case 1: return installation.version;
- case 2: return installation.location;
+ case 1: return installation.location;
default: return null;
}
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2010-01-25 21:22:54 UTC (rev 19916)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2010-01-25 21:23:54 UTC (rev 19917)
@@ -31,32 +31,21 @@
import java.util.Iterator;
import java.util.Map;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.XMLMemento;
+import org.jboss.tools.jbpm.Activator;
import org.jboss.tools.jbpm.Constants;
public class PreferencesManager {
- private static Map<Plugin, PreferencesManager> managerMap = new HashMap<Plugin, PreferencesManager>();
-
private Map<String, JbpmInstallation> jbpmInstallations = null;
private File installationsFile = null;
- private Plugin plugin;
- public static PreferencesManager getPreferencesManager(Plugin key) {
- PreferencesManager preferencesManager = managerMap.get(key);
- if (preferencesManager == null) {
- preferencesManager = new PreferencesManager(key);
- managerMap.put(key, preferencesManager);
- }
- return preferencesManager;
- }
-
- private PreferencesManager(Plugin plugin) {
- this.plugin = plugin;
+ public static final PreferencesManager INSTANCE = new PreferencesManager();
+
+ private PreferencesManager() {
initializeInstallations();
}
@@ -75,12 +64,12 @@
}
private Preferences getPreferences() {
- return plugin.getPluginPreferences();
+ return Activator.getDefault().getPluginPreferences();
}
private void initializeInstallations() {
installationsFile =
- plugin.getStateLocation().append("jbpm-installations.xml").toFile();
+ Activator.getDefault().getStateLocation().append("jbpm-installations.xml").toFile();
if (!installationsFile.exists()) {
createInstallationsFile();
} else {
15 years, 11 months
JBoss Tools SVN: r19916 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-01-25 16:22:54 -0500 (Mon, 25 Jan 2010)
New Revision: 19916
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/preferences/
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
Log:
JBIDE-4904, GPD-373 : Unification of jBPM Preference Pages
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2010-01-25 17:30:51 UTC (rev 19915)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2010-01-25 21:22:54 UTC (rev 19916)
@@ -943,18 +943,6 @@
</extension>
<extension
- point="org.eclipse.ui.preferencePages">
- <page class="org.jboss.tools.jbpm.preferences.DefaultPage"
- id="org.jboss.tools.flow.jpdl4"
- name="jBPM 4"
- category="org.jboss.tools.jbpm"/>
- <page
- class="org.jboss.tools.flow.jpdl4.preferences.Jbpm4LocationsPage"
- id="org.jboss.tools.flow.jpdl4.locations"
- name="Runtime Locations"
- category="org.jboss.tools.flow.jpdl4"/>
- </extension>
- <extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.jdt.ui.JavaPerspective">
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2010-01-25 17:30:51 UTC (rev 19915)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2010-01-25 21:22:54 UTC (rev 19916)
@@ -30,7 +30,7 @@
}
public PreferencesManager getPreferencesManager() {
- return PreferencesManager.getPreferencesManager(this);
+ return PreferencesManager.INSTANCE;
}
public void start(BundleContext context) throws Exception {
15 years, 11 months
JBoss Tools SVN: r19915 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/classes.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-01-25 12:30:51 -0500 (Mon, 25 Jan 2010)
New Revision: 19915
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/classes/
Log:
clasess folder has been added to ignore
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/classes
___________________________________________________________________
Name: svn:ignore
+ target
15 years, 11 months
JBoss Tools SVN: r19914 - trunk/smooks/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-01-25 11:46:17 -0500 (Mon, 25 Jan 2010)
New Revision: 19914
Modified:
trunk/smooks/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/brows/JBDS-821 Smooks editor is redesigned - new functinality is described
Modified: trunk/smooks/docs/reference/en/master.xml
===================================================================
--- trunk/smooks/docs/reference/en/master.xml 2010-01-25 16:45:45 UTC (rev 19913)
+++ trunk/smooks/docs/reference/en/master.xml 2010-01-25 16:46:17 UTC (rev 19914)
@@ -3,7 +3,8 @@
"http://www.docbook.org/xml/4.3/docbookx.dtd"
[
-<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY process_page SYSTEM "modules/process_page.xml">
<!ENTITY quickstart SYSTEM "modules/quick_start.xml">
<!ENTITY smooksformeditor_graphicaltab SYSTEM "modules/smooksformeditor_graphicalpage.xml">
<!ENTITY smooksformeditor_configurationtab SYSTEM "modules/smooksformeditor_configurationpage.xml">
@@ -29,13 +30,13 @@
<surname>Peng</surname>
</author>
+ <pubdate>November 2008</pubdate>
<copyright>
- <year>2009</year>
- <year>2010</year>
+ <year>2009</year>
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
- Version: 1.1.0.CR1
+ Version: 1.1.0.M2
</releaseinfo>
<abstract>
@@ -50,8 +51,10 @@
</bookinfo>
<toc/>
&introduction;
- &quickstart;
- <!--&smooksformeditor_graphicaltab;-->
- &smooksformeditor_configurationtab;
+ &process_page;
+ <!--&quickstart;
+
+ &smooksformeditor_graphicaltab;
+ &smooksformeditor_configurationtab;-->
&smooksformeditor_sourcetab;
</book>
15 years, 11 months
JBoss Tools SVN: r19913 - trunk/smooks/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-01-25 11:45:45 -0500 (Mon, 25 Jan 2010)
New Revision: 19913
Added:
trunk/smooks/docs/reference/en/modules/process_page.xml
Modified:
trunk/smooks/docs/reference/en/modules/introduction.xml
Log:
https://jira.jboss.org/jira/brows/JBDS-821 Smooks editor is redesigned - new functinality is described
Modified: trunk/smooks/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/smooks/docs/reference/en/modules/introduction.xml 2010-01-25 16:45:08 UTC (rev 19912)
+++ trunk/smooks/docs/reference/en/modules/introduction.xml 2010-01-25 16:45:45 UTC (rev 19913)
@@ -37,7 +37,7 @@
<entry><para>Smooks Configuration File Wizard</para></entry>
<entry><para>Smooks tools allows to create/edit the Smooks configuration file for Java2Java data transformation.</para></entry>
<entry>
- <link linkend="config_file_wizzard">Smooks Configuration File Wizard</link>
+ <!--<link linkend="config_file_wizzard">-->Smooks Configuration File Wizard<!--</link>-->
</entry>
</row>
@@ -45,7 +45,7 @@
<entry><para>Smooks Editor</para></entry>
<entry><para>Smooks Editor helps configure the created Smooks configuration file.</para></entry>
<entry>
- <link linkend="quickstart_formeditor">Smooks Editor</link>
+ <!--<link linkend="quickstart_formeditor">-->Smooks Editor<!--</link>-->
</entry>
</row>
@@ -105,7 +105,7 @@
</imageobject>
</mediaobject>
</figure>
- <para> For More informations about <property>Smooks</property>, please visit <ulink
+ <para> For more informations about <property>Smooks</property>, please visit <ulink
url="http://www.smooks.org">Smooks official site</ulink>.</para>
</section>
<section>
@@ -121,6 +121,11 @@
</imageobject>
</mediaobject>
</figure>
+ <para>The easiest way to use the Smooks Configuration Editor is to create a project
+ (Java project, an ESB project, etc.), right-click on it and select <property>New -> Other</property>
+ to open the New wizard. Drill into <property>Smooks -> Smooks Configuration File</property>
+ and continue through the wizard. We recommend using a minimum Smooks level of 1.1 or 1.2, but if you're using it in a deployed service, it depends on what version your runtime supports.
+ Once the file is created, it will open in the Smooks Configuration Editor.</para>
</section>
<section>
<title>How to install Smooks dev tools?</title>
@@ -133,7 +138,24 @@
<para> You should download the latest IDE for Java EE developers from <ulink
url="http://www.eclipse.org/downloads/"> Eclipse site</ulink>. It contains many plug-ins (
GEF, EMF, etc. ) required by Smooks dev tools. </para>
-
+ <para>The Smooks Configuration depends on having all of the appropriate Smooks runtime jars in the path of the Eclipse Plug-in or Java Project in the Eclipse workspace.
+
+ The easiest solution is to do the following:
+ <itemizedlist>
+ <listitem><para>1) Download the Smooks distribution from here: http://www.smooks.org/mediawiki/index.php?title=Downloads .
+ Grab the latest "ALL" distribution (as of today, it is the Smooks v.1.2.2 "ALL" distribution) and it will include binaries, examples, etc.</para></listitem>
+ <listitem><para>2) Extract files from the archive somewhere on your machine.</para></listitem>
+ <listitem><para>3) In your Eclipse workspace, copy the Smooks jars into a directory of your Eclipse plug-in or Java project named "lib".</para></listitem>
+ <listitem><para>4) For your Eclipse Plug-in or Java Project, right-click on the project and select Properties.</para></listitem>
+ <listitem><para>5) Select the "Java Build Path" item in the Properties list, select the Libraries tab, and click "Add JARs"
+ </para></listitem>
+ <listitem><para>6) In the Jar Selection dialog, select all the jars in the "lib" directory mentioned in step 3 and click <property>OK</property>.
+ </para></listitem>
+ <listitem><para>7) Click <property>OK</property> to close the Properties dialog. Now you should see a "Referenced Libraries" node that appeared in your project hierarchy in Eclipse.
+ </para></listitem>
+ </itemizedlist>
+
+ </para>
<para>Now let's progress to more advanced topics.</para>
</section>
Added: trunk/smooks/docs/reference/en/modules/process_page.xml
===================================================================
--- trunk/smooks/docs/reference/en/modules/process_page.xml (rev 0)
+++ trunk/smooks/docs/reference/en/modules/process_page.xml 2010-01-25 16:45:45 UTC (rev 19913)
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="process_page">
+ <?dbhtml filename="process_page.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Smooks</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Process Page</title>
+ <para>This chapter describes Process tab of the Smooks Configuration File editor, gives short recommendations how this tab can be used during the project configuring.</para>
+
+ <section>
+ <title>Input Task Configuring</title>
+ <para>
+ <property>Input task configuring</property> is an obligatory step for your smooks project creation.
+ You can do this on the Process page of the editor: look for the "Input Task" in the Process Map at the top of the page.
+ </para>
+ <figure>
+ <title>Input Task Configuring</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process1.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Select it and you will see all the properties to set for the Input reader of your Smooks configuration.
+ "Input type" corresponds to the type of data that you will be working with.
+ For example, to work with incoming CSV (Comma-separated Values) data, you would specify "CSV" in the drop-down list.
+ Each reader type has slightly different configuration details that must be set in the "Input configuration" area.
+ For instance, the CSV reader requires you to specify details such as the encoding, quote character, separator character, and the list of incoming fields.
+ The EDI reader requires the encoding and the path to the Mapping Model describing the incoming data.
+ In the "Input data" section, you specify some sample data that conforms to your reader configuration.
+ </para>
+
+ <para>
+ Once you've specified your reader configuration and sample data, you can see the input model rendered in a tree form in the "Input model" section.
+ On the picture below you can see the correct configuration of some XML input task.
+ </para>
+ <figure>
+ <title>Input Task Configuring</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process2.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+
+
+ <section>
+ <title>"Java Mapping" or "Apply Template"?</title>
+
+ <para>Though there are many options in Smooks as far as what you can do with input
+ data such as transformation, routing, and persistence, the first release
+ of the Smooks Configuration Editor focuses on just a couple of areas:
+ mapping to java and applying templates to create different output formats.
+ If you have a set of Java classes you want to use the incoming data for,
+ you can use the "Java Mapping" task to specify those classes and use drag and
+ drop to map between the input model generated by the reader and elements in the output model.
+ Or if you simply want to transform your output to one or more formats, you can use the "Apply Template"
+ task to map it to a CSV file, XML or XSD file (and other formats in the future).
+ </para>
+ </section>
+ <section id="mapping">
+ <title>Java Mapping</title>
+
+ <para>
+ If you decide to do Java Mapping, you need to make sure that your Input reader has been set up and you have some sample data specified.
+ Then you should select the "Input Task" in the Process tab and click the plus (+) sign to the right of the icon.
+ Select "Java Mapping" from the popup menu and it will appear to the right, connected to the "Input Task". Then select the "Java Mapping" task.
+ </para>
+ <figure>
+ <title>Java Mapping configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Another method of adding "Java Mapping" element to the canvas in the Processing Tasks section is to right click Input Task element and select in the popup menu </para>
+ <figure>
+ <title>Java Mapping configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Right-click on the canvas in an empty space and select "Add ->Java Class".
+ </para>
+ <figure>
+ <title>Java Mapping configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The "Java Bean Creation" wizard appears.
+ Specify a unique identifier for the new class, the class path, whether it's an array or not, and if it is a collection, also specify the collection class.
+ If the Java class is specified, you'll see a list of the properties in the box below.
+ Click Finish when you're done.
+ Now with the input and output models on the canvas, you can click and drag from the various input elements to corresponding output elements. Make sure to connect collection elements to corresponding collection elements.
+ Finally your mapping should look nearly like the one on the picture below.
+ </para>
+ <figure>
+ <title>Final Mapping schema</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>"Apply Template" task</title>
+
+ <para>The "Apply Template" task works very similarly to the <link linkend="mapping">"Java Mapping" task</link>, where you map between an input model and an output model.
+ Select the "Input Task" or "Java Mapping" task you want to use as the input model in the Process Map pane and click the plus (+) sign to the right of the icon.
+ </para>
+ <figure>
+ <title>"Apply Template" task opening</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Select "Apply Template" from the popup menu and it will appear to the right, connected to the task you created it from. Then select the "Apply Template" task.
+ Once you've defined your template model, you can click and drag from the various input elements to corresponding output elements in the template. Make sure to connect collection elements to corresponding collection elements
+ </para>
+ </section>
+</chapter>
+
15 years, 11 months
JBoss Tools SVN: r19912 - in trunk/smooks/docs/reference/en/images: introduction and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-01-25 11:45:08 -0500 (Mon, 25 Jan 2010)
New Revision: 19912
Added:
trunk/smooks/docs/reference/en/images/process_page/
trunk/smooks/docs/reference/en/images/process_page/process1.png
trunk/smooks/docs/reference/en/images/process_page/process2.png
trunk/smooks/docs/reference/en/images/process_page/process3.png
trunk/smooks/docs/reference/en/images/process_page/process4.png
trunk/smooks/docs/reference/en/images/process_page/process5.png
trunk/smooks/docs/reference/en/images/process_page/process6.png
trunk/smooks/docs/reference/en/images/process_page/process7.png
Modified:
trunk/smooks/docs/reference/en/images/introduction/introduction2.png
Log:
https://jira.jboss.org/jira/brows/JBDS-821 Smooks editor is redesigned - new functinality is described - commiting the missing screens
Modified: trunk/smooks/docs/reference/en/images/introduction/introduction2.png
===================================================================
(Binary files differ)
Added: trunk/smooks/docs/reference/en/images/process_page/process1.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/docs/reference/en/images/process_page/process2.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/docs/reference/en/images/process_page/process3.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/docs/reference/en/images/process_page/process4.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/docs/reference/en/images/process_page/process5.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/docs/reference/en/images/process_page/process6.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/docs/reference/en/images/process_page/process7.png
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/docs/reference/en/images/process_page/process7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
JBoss Tools SVN: r19911 - in trunk/jst/plugins/org.jboss.tools.jst.web: resources/meta and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-25 10:55:16 -0500 (Mon, 25 Jan 2010)
New Revision: 19911
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/webapp24.meta
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5712
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2010-01-25 15:28:36 UTC (rev 19910)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2010-01-25 15:55:16 UTC (rev 19911)
@@ -419,6 +419,19 @@
WebAppFolderListeners24_CreateListener.WindowTitle=Add Listener
WebAppFolderListeners24_CreateListener.Title=Web Listener
+WebAppFolderLifecycles25_CreatePostConstruct.WindowTitle=Add Post Construct
+WebAppFolderLifecycles25_CreatePostConstruct.Title=Web Post Construct
+WebAppFolderLifecycles25_CreatePreDestroy.WindowTitle=Add Pre Destroy
+WebAppFolderLifecycles25_CreatePreDestroy.Title=Web Pre Destroy
+
+WebAppFolderLifecycles25_Properties.Title=Lifecycle Callbacks
+
+WebAppFolderPersistence25_CreatePersistenceContextRef.WindowTitle=Add Persistence Context Ref
+WebAppFolderPersistence25_CreatePersistenceContextRef.Title=Web Persistence Context Ref
+WebAppFolderPersistence25_CreatePersistenceUnitRef.WindowTitle=Add Persistence Unit Ref
+WebAppFolderPersistence25_CreatePersistenceUnitRef.Title=Web Persistence Unit Ref
+WebAppFolderPersistence25_Properties.Title=Persistence
+
WebAppFolderServices_CreateServiceRef.WindowTitle=Add Service Ref
WebAppFolderServices_CreateServiceRef.Title=Service Ref
@@ -550,6 +563,18 @@
WebAppWelcomFileList_CreateWelcomFile.WindowTitle=Add Welcome File
WebAppWelcomFileList_CreateWelcomFile.Title=Web Welcome File
+Web.CreatePersistenceProperty.WindowTitle=Add Persistence Property
+Web.CreatePersistenceProperty.Title=Web Persistence Property
+Web.CreateInjectionTarget.WindowTitle=Add Injection Target
+Web.CreateInjectionTarget.Title=Web Injection Target
+
+WebAppPersistenceContextRef25_Properties.Title=Web Persistence Context Ref
+WebAppPersistenceProperty25_Properties.Title=Web Persistence Property
+WebAppPersistenceUnitRef25_Properties.Title=Web Persistence Unit Ref
+WebAppPostConstruct25_Properties.Title=Web Post Construct
+WebAppPreDestroy25_Properties.Title=Web Pre Destroy
+WebAppInjectionTarget25_Properties.Title=Web Injection Target
+
##### web role element #####
WebAppRoleName_Properties.Title=Web Role
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/webapp24.meta
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/webapp24.meta 2010-01-25 15:28:36 UTC (rev 19910)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/webapp24.meta 2010-01-25 15:55:16 UTC (rev 19911)
@@ -573,6 +573,8 @@
<XChildEntity maxCount="1" name="WebAppFolderResources" required="yes"/>
<XChildEntity maxCount="1" name="WebAppFolderMessageDestinations" required="yes"/>
<XChildEntity maxCount="1" name="WebAppLocaleEncodingMappingList" required="yes"/>
+ <XChildEntity maxCount="1" name="WebAppFolderPersistence25" required="yes"/>
+ <XChildEntity maxCount="1" name="WebAppFolderLifecycles25" required="yes"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
@@ -1139,6 +1141,72 @@
<XDependencies/>
</XModelEntity>
<XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.jst.web.ui.editors.webapp.form.WebAppFormLayoutData;children=%EntityOrdered%" name="WebAppFolderLifecycles25">
+ <XChildrenEntities>
+ <XChildEntity name="WebAppPostConstruct25"/>
+ <XChildEntity name="WebAppPreDestroy25"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.jsf.components" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="lifecycle callbacks" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;" default="Lifecycle Callbacks"
+ name="name" xmlname="NAME">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%CreateForWeb23%"
+ ICON="action.new.struts.webapp.res_env_ref"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Post Construct..." kind="action" name="CreatePostConstruct">
+ <EntityData EntityName="WebAppPostConstruct25">
+ <AttributeData AttributeName="lifecycle-callback-method"/>
+ <AttributeData AttributeName="lifecycle-callback-class" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%CreateForWeb23%"
+ ICON="action.new.struts.webapp.res_env_ref"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Pre Destroy..." kind="action" name="CreatePreDestroy">
+ <EntityData EntityName="WebAppPreDestroy25">
+ <AttributeData AttributeName="lifecycle-callback-method"/>
+ <AttributeData AttributeName="lifecycle-callback-class" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.ShowMenuHandler"
+ PROPERTIES="actionList=CreateActions" displayName="Callback..."
+ kind="action" name="AddAnyCallback"/>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action" name="Cut"/>
+ <XActionItem BaseActionName="Copy" HandlerClassName="%CopyChildren%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Paste" HandlerClassName="%Paste%"
+ ICON="action.paste" displayName="Paste" kind="action" name="Paste"/>
+ </XActionItem>
+ <XActionItem kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete"
+ HandlerClassName="%DeleteChildren%" ICON="action.delete"
+ displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.jst.web.ui.editors.webapp.form.WebAppFormLayoutData;children=%Ordered%" name="WebAppFolderListeners24">
<XChildrenEntities>
<XChildEntity name="WebAppListener24"/>
@@ -1190,6 +1258,118 @@
<XDependencies/>
</XModelEntity>
<XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.jst.web.ui.editors.webapp.form.WebAppFormLayoutData;children=%Ordered%" name="WebAppFolderPersistence25">
+ <XChildrenEntities>
+ <XChildEntity name="WebAppPersistenceContextRef25"/>
+ <XChildEntity name="WebAppPersistenceUnitRef25"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.jsf.components" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="persistence" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;" default="Persistence"
+ name="name" xmlname="NAME">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%CreateForWeb23%"
+ ICON="action.new.struts.webapp.res_env_ref"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Persistence Context Ref..." kind="action" name="CreatePersistenceContextRef">
+ <EntityData EntityName="WebAppPersistenceContextRef25">
+ <AttributeData AttributeName="ref-name"/>
+ <AttributeData AttributeName="unit-name" Mandatory="no"/>
+ <AttributeData AttributeName="type" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%"
+ ICON="action.new.struts.webapp.res_ref"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Persistence Unit Ref..." kind="action" name="CreatePersistenceUnitRef">
+ <EntityData EntityName="WebAppPersistenceUnitRef25">
+ <AttributeData AttributeName="ref-name"/>
+ <AttributeData AttributeName="unit-name" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.ShowMenuHandler"
+ PROPERTIES="actionList=CreateActions" displayName="Ref..."
+ kind="action" name="AddAnyRef"/>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action" name="Cut"/>
+ <XActionItem BaseActionName="Copy" HandlerClassName="%CopyChildren%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Paste" HandlerClassName="%Paste%"
+ ICON="action.paste" displayName="Paste" kind="action" name="Paste"/>
+ </XActionItem>
+ <XActionItem kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete"
+ HandlerClassName="%DeleteChildren%" ICON="action.delete"
+ displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ XMLSUBPATH="injection-target" name="WebAppInjectionTarget25">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.struts.webapp.listener" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="injection target" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="save=always;category=general"
+ name="class" xmlname="injection-target-class.#text">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="save=always;id=true;category=general"
+ name="name" xmlname="injection-target-name.#text"/>
+ <XModelAttribute name="id" visibility="false" xmlname="id"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.copy" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.jst.web.ui.editors.webapp.form.WebAppFormLayoutData"
XMLSUBPATH="jsp-property-group" name="WebAppJSPPropertyGroup">
<XChildrenEntities/>
@@ -1625,6 +1805,272 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="children=%EntityOrdered%"
+ XMLSUBPATH="persistence-context-ref" name="WebAppPersistenceContextRef25">
+ <XChildrenEntities>
+ <XChildEntity name="WebAppPersistenceProperty25"/>
+ <XChildEntity name="WebAppInjectionTarget25"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.struts.webapp.listener" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="persistence context ref"
+ loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="description" xmlname="description.#text">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;save=always;category=general"
+ name="ref-name" xmlname="persistence-context-ref-name.#text"/>
+ <XModelAttribute PROPERTIES="category=general" name="unit-name" xmlname="persistence-unit-name.#text"/>
+ <XModelAttribute PROPERTIES="category=general" name="type" xmlname="persistence-context-type.#text">
+ <Constraint loader="List">
+ <value/>
+ <value name="Transaction"/>
+ <value name="Extended"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="mapped-name" xmlname="mapped-name.#text"/>
+ <XModelAttribute name="id" visibility="false" xmlname="id"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Persistence Property..." kind="action" name="CreatePersistenceProperty">
+ <EntityData EntityName="WebAppPersistenceProperty25">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="value"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Injection Target..." kind="action" name="CreateInjectionTarget">
+ <EntityData EntityName="WebAppInjectionTarget25">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="class"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.copy" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ XMLSUBPATH="persistence-property" name="WebAppPersistenceProperty25">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.struts.webapp.listener" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="persistence property" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="save=always;id=true;category=general"
+ name="name" xmlname="name.#text"/>
+ <XModelAttribute PROPERTIES="save=always;category=general"
+ name="value" xmlname="value.#text">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute name="id" visibility="false" xmlname="id"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.copy" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="children=%Ordered%" XMLSUBPATH="persistence-unit-ref" name="WebAppPersistenceUnitRef25">
+ <XChildrenEntities>
+ <XChildEntity name="WebAppInjectionTarget25"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.struts.webapp.listener" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="persistence unit ref" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="description" xmlname="description.#text">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;save=always;category=general"
+ name="ref-name" xmlname="persistence-unit-ref-name.#text"/>
+ <XModelAttribute PROPERTIES="category=general" name="unit-name" xmlname="persistence-unit-name.#text"/>
+ <XModelAttribute PROPERTIES="category=general" name="mapped-name" xmlname="mapped-name.#text"/>
+ <XModelAttribute name="id" visibility="false" xmlname="id"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Persistence Property..." kind="action" name="CreateInjectionTarget">
+ <EntityData EntityName="WebAppInjectionTarget25">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="class"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.copy" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%" XMLSUBPATH="post-construct" name="WebAppPostConstruct25">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.struts.webapp.listener" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="post construct" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general"
+ name="lifecycle-callback-class" xmlname="lifecycle-callback-class.#text">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="save=always;category=general;id=true"
+ name="lifecycle-callback-method" xmlname="lifecycle-callback-method.#text"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.copy" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%" XMLSUBPATH="pre-destroy" name="WebAppPreDestroy25">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.struts.webapp.listener" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="pre destroy" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general"
+ name="lifecycle-callback-class" xmlname="lifecycle-callback-class.#text">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="save=always;category=general;id=true"
+ name="lifecycle-callback-method" xmlname="lifecycle-callback-method.#text"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.copy" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
<XModelEntity
ImplementingClass="org.jboss.tools.jst.web.webapp.model.WebAppServiceRefImpl"
XMLSUBPATH="service-ref" name="WebAppServiceRef">
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java 2010-01-25 15:28:36 UTC (rev 19910)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java 2010-01-25 15:55:16 UTC (rev 19911)
@@ -131,13 +131,18 @@
return true;
} else if(!"WebAppServlet".equals(entity)) { //$NON-NLS-1$
- return super.saveChildren(element, o);
+ boolean b = super.saveChildren(element, o);
+ if(o.getModelEntity().getAttribute("mapped-name") != null) { //$NON-NLS-1$
+ moveChild(element, "mapped-name", "injection-target"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return b;
}
saveChildren(element, o, "WebAppInitParam"); //$NON-NLS-1$
String l = o.getAttributeValue("load-on-startup"); //$NON-NLS-1$
if(l.length() > 0) saveAttribute(element, "load-on-startup.#text", l); //$NON-NLS-1$
saveChildren(element, o, "WebAppRunAs"); //$NON-NLS-1$
saveChildren(element, o, "WebAppSecurityRoleRef"); //$NON-NLS-1$
+
return true;
}
@@ -213,6 +218,30 @@
return -1;
}
+ private void moveChild(Element element, String child, String childAfter) {
+ NodeList l = element.getChildNodes();
+ Element childE = null;
+ Element childAfterE = null;
+ for (int i = 0; i < l.getLength(); i++) {
+ Node n = l.item(i);
+ if(n.getNodeType() != Node.ELEMENT_NODE) continue;
+ String name = n.getNodeName();
+ if(child.equals(name)) {
+ childE = (Element)n;
+ } else if(childAfter.equals(name)) {
+ if(childAfterE == null) childAfterE = (Element)n;
+ }
+ }
+ if(childE != null) {
+ element.removeChild(childE);
+ if(childAfterE != null) {
+ element.insertBefore(childE, childAfterE);
+ } else {
+ element.appendChild(childE);
+ }
+ }
+ }
+
public boolean save(Element parent, XModelObject o) {
if(!needToSave(o)) return true;
return super.save(parent, o);
15 years, 11 months