You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2010/04/29 02:57:15 UTC
svn commit: r939152 [6/7] - in
/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui:
./ META-INF/ icons/ src/main/java/org/apache/geronimo/st/v30/ui/
src/main/java/org/apache/geronimo/st/v30/ui/actions/
src/main/java/org/apache...
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerPluginSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerPluginSection.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerPluginSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerPluginSection.java Thu Apr 29 00:57:12 2010
@@ -16,10 +16,10 @@
*/
package org.apache.geronimo.st.v30.ui.sections;
-import org.apache.geronimo.st.v30.core.internal.Trace;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractServerEditorSection;
import org.apache.geronimo.st.v30.core.operations.GeronimoServerPluginManager;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.internal.Trace;
+import org.apache.geronimo.st.v30.ui.sections.AbstractServerEditorSection;
import org.apache.geronimo.st.v30.ui.wizards.ServerCustomAssemblyWizard;
import org.apache.geronimo.st.v30.ui.wizards.ServerPluginManagerDialog;
import org.apache.geronimo.st.v30.ui.wizards.ServerPluginManagerWizard;
@@ -40,8 +40,6 @@ import org.eclipse.ui.forms.widgets.Sect
import org.eclipse.wst.server.core.IServer;
/**
- * Server advanced editor section
- *
* @version $Rev$ $Date$
*/
public class ServerPluginSection extends AbstractServerEditorSection {
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java?rev=939152&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java Thu Apr 29 00:57:12 2010
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.sections;
+
+import org.apache.geronimo.st.v30.ui.commands.SetVMArgsCommand;
+import org.apache.geronimo.st.v30.ui.internal.Messages;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.StringVariableSelectionDialog;
+import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+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.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ServerVMArgsSection extends AbstractServerEditorSection {
+
+ protected Text fVMArgumentsText;
+ private Button fPgrmArgVariableButton;
+
+ public ServerVMArgsSection() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
+ */
+ public void createSection(Composite parent) {
+ super.createSection(parent);
+ FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+ Section section = toolkit.createSection(parent,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE);
+ section.setText(Messages.editorSectionVMArgsTitle);
+ section.setDescription(Messages.editorSectionVMArgsDescription);
+ section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+ Composite composite = toolkit.createComposite(section);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginHeight = 5;
+ layout.marginWidth = 10;
+ layout.verticalSpacing = 5;
+ layout.horizontalSpacing = 15;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ section.setClient(composite);
+
+ fVMArgumentsText = new Text(composite, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 75;
+ gd.widthHint = 100;
+ fVMArgumentsText.setLayoutData(gd);
+ fVMArgumentsText.setText(getArgs());
+ fVMArgumentsText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ execute(new SetVMArgsCommand(server, getAttributeValueFrom(fVMArgumentsText)));
+ }
+ });
+
+
+ fPgrmArgVariableButton = SWTFactory.createPushButton(composite, LauncherMessages.VMArgumentsBlock_4, null);
+ fPgrmArgVariableButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+ fPgrmArgVariableButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+ dialog.open();
+ String variable = dialog.getVariableExpression();
+ if (variable != null) {
+ fVMArgumentsText.insert(variable);
+ }
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ });
+ }
+
+ protected String getAttributeValueFrom(Text text) {
+ String content = text.getText().trim();
+ if (content.length() > 0) {
+ return content;
+ }
+ return null;
+ }
+
+ private String getArgs() {
+ return gs != null && gs.getVMArgs() != null ? gs.getVMArgs() : "";
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServiceRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServiceRefSection.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServiceRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServiceRefSection.java Thu Apr 29 00:57:12 2010
@@ -20,12 +20,11 @@ import java.util.List;
import javax.xml.bind.JAXBElement;
-
import org.apache.geronimo.jee.naming.Port;
import org.apache.geronimo.jee.naming.PortCompletion;
import org.apache.geronimo.jee.naming.ServiceRef;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
import org.apache.geronimo.st.v30.ui.Activator;
import org.apache.geronimo.st.v30.ui.wizards.ServiceRefWizard;
import org.eclipse.jface.viewers.ILabelProvider;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebContainerSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebContainerSection.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebContainerSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebContainerSection.java Thu Apr 29 00:57:12 2010
@@ -22,8 +22,8 @@ import org.apache.geronimo.jee.naming.Gb
import org.apache.geronimo.jee.naming.ObjectFactory;
import org.apache.geronimo.jee.naming.Pattern;
import org.apache.geronimo.jee.web.WebApp;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractSectionPart;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebGeneralSection.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/WebGeneralSection.java Thu Apr 29 00:57:12 2010
@@ -19,7 +19,7 @@ package org.apache.geronimo.st.v30.ui.se
import javax.xml.bind.JAXBElement;
import org.apache.geronimo.jee.web.WebApp;
-import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java?rev=939152&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java Thu Apr 29 00:57:12 2010
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import java.util.List;
+
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractTableWizard extends AbstractWizard {
+
+ protected AbstractTableSection section;
+
+ public AbstractTableWizard(AbstractTableSection section) {
+ super();
+ this.section = section;
+ }
+
+ public abstract JAXBObjectFactory getEFactory();
+
+ public abstract String[] getTableColumnEAttributes();
+
+ public abstract void addPages();
+
+ public abstract class AbstractTableWizardPage extends AbstractWizardPage {
+ protected Text[] textEntries = new Text[getTableColumnEAttributes().length];
+
+ public AbstractTableWizardPage(String pageName) {
+ super(pageName);
+ }
+
+ public void createControl(Composite parent) {
+ Composite composite = createComposite(parent);
+ createEditFields(composite);
+ doCustom(composite);
+ setControl(composite);
+ textEntries[0].setFocus();
+ }
+
+ public void createEditFields(Composite composite) {
+ for (int i = 0; i < section.getTableColumnNames().length; i++) {
+ createLabel(composite, section.getTableColumnNames()[i]);
+ String initialValue = "";
+ if (eObject != null) {
+ try {
+ initialValue = (String) JAXBUtils.getValue(eObject, getTableColumnEAttributes()[i]);
+ } catch (Exception e) {
+ MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+ }
+ }
+ textEntries[i] = createTextField(composite, initialValue);
+ }
+ }
+
+ public void doCustom(Composite parent) {
+ }
+
+ public Text getTextEntry(int object) {
+ return textEntries[object];
+ }
+
+ @Override
+ protected abstract String getWizardPageTitle();
+
+ @Override
+ protected abstract String getWizardPageDescription();
+ }
+
+ @Override
+ public boolean performFinish() {
+ if (eObject == null) {
+ eObject = getEFactory().create(section.getTableEntryObjectType());
+ List objectContainer = section.getObjectContainer();
+ objectContainer.add(eObject);
+ }
+ processEAttributes(getPages()[0]);
+ if (section.getViewer().getInput() == null) {
+ section.getViewer().setInput(section.getInput());
+ }
+ return true;
+ }
+
+ public void processEAttributes(IWizardPage page) {
+ if (page instanceof AbstractTableWizardPage) {
+ for (int i = 0; i < getTableColumnEAttributes().length; i++) {
+ String value = ((AbstractTableWizardPage) page).textEntries[i].getText();
+ String attribute = getTableColumnEAttributes()[i];
+ try {
+ JAXBUtils.setValue(eObject, attribute, value);
+ } catch (Exception e) {
+ MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+ }
+ }
+ }
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTableWizard.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java?rev=939152&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java Thu Apr 29 00:57:12 2010
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import java.util.ArrayList;
+
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractTreeWizard extends AbstractWizard {
+
+ protected AbstractTreeSection section;
+
+ protected String[] elementTypes = null;
+ protected int maxTextFields;
+
+ protected Combo element;
+ protected ArrayList<Text> textList;
+
+ /*
+ * AbstractTreeWizard takes 3 parameters
+ * The Tree Section that is being added/edited
+ * elementTypeCount for how many different elements could be handled
+ * maxTextFields for the maximum number of fields an element may have.
+ *
+ * For the most part, the user will be given an opportunity to add any kind of\
+ * element by using a combo. When the combo changes, the fields need to change
+ * to allow the appropriate fields to be used.
+ */
+ public AbstractTreeWizard(AbstractTreeSection section, int elementTypeCount, int maxTextFields) {
+ super();
+ this.section = section;
+ elementTypes = new String[elementTypeCount];
+ this.maxTextFields = maxTextFields;
+ textList = new ArrayList<Text>(maxTextFields);
+ }
+
+ public abstract class AbstractTreeWizardPage extends AbstractWizardPage {
+ protected ArrayList<Label> labelList;
+
+ public AbstractTreeWizardPage(String pageName) {
+ super(pageName);
+ labelList = new ArrayList<Label>(maxTextFields);
+ }
+
+ public void createControl(Composite parent) {
+ Label label;
+ Text text;
+ Composite composite = createComposite(parent);
+ createLabel(composite, CommonMessages.element);
+ element = createCombo(composite, elementTypes, false);
+ for (int i = 0; i < maxTextFields; i++) {
+ label = createLabel(composite, "");
+ labelList.add(label);
+ text = createTextField(composite, "");
+ textList.add(text);
+ }
+ element.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent arg0) {
+ toggleFields(true);
+ }
+ });
+
+ initControl();
+ toggleFields(false);
+ setControl(composite);
+ }
+
+ protected abstract void initControl();
+
+ protected abstract void toggleFields(boolean clearFields);
+ }
+
+ protected abstract String getAddWizardWindowTitle();
+
+ protected abstract String getEditWizardWindowTitle();
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractTreeWizard.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java?rev=939152&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java Thu Apr 29 00:57:12 2010
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import org.apache.geronimo.st.v30.ui.Activator;
+import org.apache.geronimo.st.v30.ui.SortListener;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractWizard extends Wizard {
+
+ protected Object eObject;
+
+ public AbstractWizard() {
+ super();
+ setWindowTitle(getAddWizardWindowTitle());
+ }
+
+ public void setEObject(Object object) {
+ eObject = object;
+ setWindowTitle(getEditWizardWindowTitle());
+ }
+
+ public abstract class AbstractWizardPage extends WizardPage {
+ public AbstractWizardPage(String pageName) {
+ super(pageName);
+ setTitle(getWizardPageTitle());
+ setDescription(getWizardPageDescription());
+ setImageDescriptor(getImageDescriptor());
+ }
+
+ protected Composite createComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ data.heightHint = 230;
+ data.widthHint = 300;
+ composite.setLayoutData(data);
+ return composite;
+ }
+
+ public GridData createGridData() {
+ return createGridData (400, 300);
+ }
+
+ public GridData createGridData(int heightHint, int widthHint) {
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.grabExcessHorizontalSpace = true;
+ data.heightHint = heightHint;
+ data.widthHint = widthHint;
+ return data;
+ }
+
+ protected Label createLabel(Composite composite, String labelString) {
+ Label label = new Label(composite, SWT.LEFT);
+ if (!labelString.endsWith(":") && labelString.length() > 0) {
+ labelString = labelString.concat(":");
+ }
+ label.setText(labelString);
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ label.setLayoutData(data);
+ return label;
+ }
+
+ protected Text createTextField(Composite composite, String initialValue,boolean isPassword) {
+ int style = SWT.SINGLE | SWT.BORDER;
+ if (isPassword) style |= SWT.PASSWORD;
+ Text text = new Text(composite, style);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
+ data.grabExcessHorizontalSpace = true;
+ data.widthHint = 100;
+ text.setLayoutData(data);
+ if (initialValue != null) {
+ text.setText(initialValue);
+ }
+ return text;
+ }
+
+ protected Text createTextField(Composite composite, String initialValue) {
+ return createTextField(composite,initialValue,false);
+ }
+
+ protected Text createMultiTextField(Composite composite, String[] initialValue) {
+ Text text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.widthHint = 100;
+ text.setLayoutData(data);
+ if (initialValue != null) {
+ String temp = "";
+ for (int i = 0; i < initialValue.length; i++) {
+ temp += initialValue[i] + "\n";
+ }
+ text.setText(temp);
+ }
+ return text;
+ }
+
+ protected Combo createCombo(Composite composite, String[] items, boolean editable) {
+ int style = SWT.NONE;
+ if (!editable) {
+ style = SWT.READ_ONLY;
+ }
+ Combo combo = new Combo(composite, style);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
+ data.grabExcessHorizontalSpace = true;
+ data.widthHint = 100;
+ combo.setLayoutData(data);
+ combo.setItems(items);
+ return combo;
+ }
+
+ protected Button createButton(Composite composite, String buttonString) {
+ Button button = new Button(composite, SWT.RADIO);
+ button.setText(buttonString);
+ GridData data = new GridData();
+ data.horizontalSpan = 2;
+ button.setLayoutData(data);
+ return button;
+ }
+
+ protected Button createPushButton(Composite composite, String buttonString) {
+ Button button = new Button(composite, SWT.PUSH);
+ button.setText(buttonString);
+ GridData data = new GridData();
+ data.horizontalSpan = 1;
+ button.setLayoutData(data);
+ return button;
+ }
+
+ protected Table createTable(Composite composite, String[] columnNames, int[] columnWidths) {
+ int style = SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+
+ Table table = new Table(composite, style);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalSpan = 2;
+ data.horizontalAlignment = GridData.FILL;
+ data.heightHint = 250;
+ data.widthHint = 350;
+ table.setLayoutData(data);
+ table.setLinesVisible(false);
+ table.setHeaderVisible(true);
+
+ final TableColumn[] column = new TableColumn[columnNames.length];
+ Listener sortListener = new SortListener(table, columnNames);
+ for (int i = 0; i < columnNames.length; ++i) {
+ column[i] = new TableColumn(table, SWT.LEFT, i);
+ column[i].setText(columnNames[i]);
+ column[i].setWidth(columnWidths[i]);
+ column[i].addListener(SWT.Selection, sortListener);
+ }
+ return table;
+ }
+
+ protected Table createEditableTable(Composite composite, String[] columnNames, int[] columnWidths) {
+ int style = SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+
+ Table table = new Table(composite, style);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalSpan = 1;
+ data.horizontalAlignment = GridData.FILL;
+ data.heightHint = 250;
+ data.widthHint = 350;
+ table.setLayoutData(data);
+ table.setLinesVisible(false);
+ table.setHeaderVisible(true);
+
+ final TableColumn[] column = new TableColumn[columnNames.length];
+ Listener sortListener = new SortListener(table, columnNames);
+ for (int i = 0; i < columnNames.length; ++i) {
+ column[i] = new TableColumn(table, SWT.LEFT, i);
+ column[i].setText(columnNames[i]);
+ column[i].setWidth(columnWidths[i]);
+ column[i].addListener(SWT.Selection, sortListener);
+ }
+ return table;
+ }
+
+ protected abstract String getWizardPageTitle();
+
+ protected abstract String getWizardPageDescription();
+ }
+
+ protected abstract String getAddWizardWindowTitle();
+
+ protected abstract String getEditWizardWindowTitle();
+
+ protected ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.apache.geronimo.ui", "icons/bigG.gif");
+ }
+
+ protected boolean isEmpty(String text) {
+ return text == null || text.trim().length() <= 0;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AdminObjectWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AdminObjectWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AdminObjectWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AdminObjectWizard.java Thu Apr 29 00:57:12 2010
@@ -21,11 +21,11 @@ import java.util.List;
import org.apache.geronimo.jee.connector.Adminobject;
import org.apache.geronimo.jee.connector.AdminobjectInstance;
import org.apache.geronimo.jee.connector.ConfigPropertySetting;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.ui.sections.AdminObjectSection;
/**
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ClassFilterWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ClassFilterWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ClassFilterWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ClassFilterWizard.java Thu Apr 29 00:57:12 2010
@@ -18,12 +18,12 @@ package org.apache.geronimo.st.v30.ui.wi
import javax.xml.bind.JAXBElement;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.st.v30.ui.sections.ClassFilterSection;
import org.apache.geronimo.jee.deployment.ClassFilter;
import org.apache.geronimo.jee.deployment.Environment;
@@ -75,7 +75,7 @@ public class ClassFilterWizard extends A
}
/* (non-Javadoc)
- * @see org.apache.geronimo.st.ui.wizards.AbstractTableWizard#performFinish()
+ * @see org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard#performFinish()
*/
public boolean performFinish() {
AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DBPoolWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DBPoolWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DBPoolWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DBPoolWizard.java Thu Apr 29 00:57:12 2010
@@ -18,6 +18,7 @@ package org.apache.geronimo.st.v30.ui.wi
import java.util.ArrayList;
import javax.xml.bind.JAXBElement;
+
import org.apache.geronimo.jee.application.Application;
import org.apache.geronimo.jee.application.ExtModule;
import org.apache.geronimo.jee.application.Path;
@@ -36,12 +37,12 @@ import org.apache.geronimo.jee.deploymen
import org.apache.geronimo.jee.deployment.Pattern;
import org.apache.geronimo.jee.openejb.OpenejbJar;
import org.apache.geronimo.jee.web.WebApp;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.Activator;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.Activator;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.Action;
@@ -75,7 +76,7 @@ import org.eclipse.swt.widgets.Text;
public class DBPoolWizard extends AbstractTableWizard {
protected ImageDescriptor descriptor = Activator.imageDescriptorFromPlugin(
- "org.apache.geronimo.st.ui", "icons/bigG.gif");
+ "org.apache.geronimo.st.v30.ui", "icons/bigG.gif");
public DBPoolWizard(AbstractTableSection section) {
super(section);
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DependencyWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DependencyWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DependencyWizard.java Thu Apr 29 00:57:12 2010
@@ -19,12 +19,12 @@ package org.apache.geronimo.st.v30.ui.wi
import java.util.List;
import org.apache.geronimo.jee.deployment.Dependency;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.st.v30.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbLocalRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbLocalRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbLocalRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbLocalRefWizard.java Thu Apr 29 00:57:12 2010
@@ -16,11 +16,11 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
/**
* @version $Rev$ $Date$
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRefWizard.java Thu Apr 29 00:57:12 2010
@@ -16,11 +16,11 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
/**
* @version $Rev$ $Date$
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRelationWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRelationWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRelationWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/EjbRelationWizard.java Thu Apr 29 00:57:12 2010
@@ -21,12 +21,12 @@ import javax.xml.bind.JAXBElement;
import org.apache.geronimo.jee.openejb.EjbRelation;
import org.apache.geronimo.jee.openejb.EjbRelationshipRole;
import org.apache.geronimo.jee.openejb.Relationships;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.ui.sections.EjbRelationSection;
/**
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ExtModuleWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ExtModuleWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ExtModuleWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ExtModuleWizard.java Thu Apr 29 00:57:12 2010
@@ -20,12 +20,12 @@ import java.util.List;
import javax.xml.bind.JAXBElement;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.core.jaxb.JAXBUtils;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.jee.application.Application;
import org.apache.geronimo.jee.application.ExtModule;
import org.apache.geronimo.jee.application.Path;
@@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-/**
+/*
* @version $Rev$ $Date$
*/
public class ExtModuleWizard extends AbstractTableWizard {
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/FacetInstallPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/FacetInstallPage.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/FacetInstallPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/FacetInstallPage.java Thu Apr 29 00:57:12 2010
@@ -16,9 +16,9 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.core.internal.Trace;
-import org.apache.geronimo.st.ui.CommonMessages;
import org.apache.geronimo.st.v30.core.DeploymentPlanInstallConfig;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.internal.Trace;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -44,10 +44,10 @@ public class FacetInstallPage extends Ab
public FacetInstallPage() {
super("geronimo.plan.install");
Trace.tracePoint("Constructor Entry", "FacetInstallPage");
-
+
setTitle("Geronimo Deployment Plan");
setDescription("Configure the geronimo deployment plan.");
-
+
Trace.tracePoint("Constructor Exit", "FacetInstallPage");
}
@@ -60,7 +60,7 @@ public class FacetInstallPage extends Ab
Trace.tracePoint("Entry", "FacetInstallPage.setConfig", config);
this.config = (DeploymentPlanInstallConfig) config;
-
+
Trace.tracePoint("Exit", "FacetInstallPage.setConfig");
}
@@ -71,7 +71,7 @@ public class FacetInstallPage extends Ab
*/
public void createControl(Composite parent) {
Trace.tracePoint("Entry", "FacetInstallPage.createControl", parent);
-
+
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(2, false));
@@ -81,36 +81,36 @@ public class FacetInstallPage extends Ab
groupText = new Text(composite, SWT.BORDER);
groupText.setLayoutData(createGridData());
groupText.setText("default");
-
+
Label artifactLabel = new Label(composite, SWT.NONE);
artifactLabel.setText(CommonMessages.artifactId);
artifactText = new Text(composite, SWT.BORDER);
artifactText.setLayoutData(createGridData());
-
+
Label versionLabel = new Label(composite, SWT.NONE);
versionLabel.setText(CommonMessages.version);
versionText = new Text(composite, SWT.BORDER);
versionText.setLayoutData(createGridData());
versionText.setText("1.0");
-
+
Label typeLabel = new Label(composite, SWT.NONE);
typeLabel.setText(CommonMessages.artifactType);
typeText = new Text(composite, SWT.BORDER);
typeText.setLayoutData(createGridData());
typeText.setText("car");
-
+
sharedLib = new Button(composite, SWT.CHECK);
GridData data = createGridData();
data.horizontalSpan = 2;
data.verticalIndent = 5;
sharedLib.setLayoutData(data);
sharedLib.setText(CommonMessages.addSharedLib);
-
+
setControl(composite);
-
+
Trace.tracePoint("Exit", "FacetInstallPage.createControl");
}
@@ -121,13 +121,13 @@ public class FacetInstallPage extends Ab
*/
public void transferStateToConfig() {
Trace.tracePoint("Entry", "FacetInstallPage.transferStateToConfig");
-
+
config.setGroupId(groupText.getText());
config.setArtifactId(artifactText.getText());
config.setVersion(versionText.getText());
config.setType(typeText.getText());
config.setSharedLib(sharedLib.getSelection());
-
+
Trace.tracePoint("Exit", "FacetInstallPage.transferStateToConfig");
}
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java Thu Apr 29 00:57:12 2010
@@ -22,12 +22,12 @@ import org.apache.geronimo.jee.naming.Gb
import org.apache.geronimo.jee.naming.ObjectFactory;
import org.apache.geronimo.jee.naming.Pattern;
import org.apache.geronimo.jee.web.WebApp;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTreeWizard;
/**
* @version $Rev$ $Date$
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java Thu Apr 29 00:57:12 2010
@@ -23,12 +23,12 @@ import org.apache.geronimo.jee.deploymen
import org.apache.geronimo.jee.deployment.ObjectFactory;
import org.apache.geronimo.jee.deployment.Pattern;
import org.apache.geronimo.jee.deployment.Reference;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTreeWizard;
/**
* @version $Rev$ $Date$
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java Thu Apr 29 00:57:12 2010
@@ -16,8 +16,8 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractWizard;
import org.apache.geronimo.system.plugin.model.LicenseType;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Combo;
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java?rev=939152&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java Thu Apr 29 00:57:12 2010
@@ -0,0 +1,241 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import org.apache.geronimo.st.v30.core.operations.GeronimoAccountManager;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.internal.Messages;
+import org.eclipse.jface.dialogs.MessageDialog;
+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.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ManageAccountWizard extends AbstractWizard {
+
+ protected Button addUser;
+ protected Button delUser;
+ protected Button editUser;
+
+ protected Label userName;
+ protected Label groupName;
+ protected Label newPassword;
+ protected Label confirmPassword;
+
+ protected Composite actioncomposite;
+ protected Text userNameText;
+ protected Combo userNameComobox;
+ protected Combo groupComobox;
+ protected Text newPasswordText;
+ protected Text confirmPasswordText;
+
+ private String[] nameList;
+ private String[] groupList;
+
+ private GeronimoAccountManager manager;
+
+
+ public ManageAccountWizard(GeronimoAccountManager mgr) {
+ super();
+ manager = mgr;
+ nameList = manager.getUserList();
+ groupList = manager.getGroupList();
+ }
+
+
+ public class ManageAccountWizardPage extends AbstractWizardPage {
+
+ public ManageAccountWizardPage(String pageName) {
+ super(pageName);
+ }
+
+
+ protected Composite createComposite(Composite parent) {
+ Composite composite =super.createComposite(parent);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ // layout.makeColumnsEqualWidth=true;
+ composite.setLayout(layout);
+ return composite;
+ }
+
+ @Override
+ protected String getWizardPageDescription() {
+ return CommonMessages.manageAccountDescription;
+ }
+
+ @Override
+ protected String getWizardPageTitle() {
+ return CommonMessages.manageAccount;
+ }
+
+ public void createControl(final Composite parent) {
+ final Composite composite = createComposite(parent);
+ addUser = this.createButton(composite, CommonMessages.addUser);
+ GridData data = new GridData();
+ data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace=true;
+ data.horizontalAlignment = GridData.CENTER;
+ addUser.setLayoutData(data);
+ addUser.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent arg0) {
+ updateUIByAction(composite);
+ }
+ });
+
+ delUser = this.createButton(composite, CommonMessages.delUser);
+ data = new GridData();
+ data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace=true;
+ data.horizontalAlignment = GridData.CENTER;
+ delUser.setLayoutData(data);
+ delUser.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent arg0) {
+ updateUIByAction(composite);
+ }
+ });
+
+ editUser = this.createButton(composite, CommonMessages.editUser);
+ data = new GridData();
+ data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace=true;
+ data.horizontalAlignment = GridData.CENTER;
+ editUser.setLayoutData(data);
+ editUser.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent arg0) {
+ updateUIByAction(composite);
+ }
+ });
+
+ // updateUIByAction(composite);
+
+ setControl(composite);
+ }
+
+ private void updateUIByAction(Composite composite){
+ if (actioncomposite!=null) actioncomposite.dispose();
+
+ actioncomposite = this.createComposite(composite);
+ GridLayout layout = new GridLayout();
+ layout.numColumns=2;
+ actioncomposite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL, GridData.FILL,true,true);
+ data.horizontalSpan =3;
+ actioncomposite.setLayoutData(data);
+
+ if (addUser.getSelection()){
+ userName = this.createLabel(actioncomposite, CommonMessages.username);
+ userNameText = this.createTextField(actioncomposite, "",false);
+
+ groupName = this.createLabel(actioncomposite, CommonMessages.groupName);
+ groupComobox = this.createCombo(actioncomposite, groupList, false);
+ groupComobox.select(0);
+
+ newPassword = this.createLabel(actioncomposite, CommonMessages.newPassword);
+ newPasswordText = this.createTextField(actioncomposite, "",true);
+
+ confirmPassword = this.createLabel(actioncomposite, CommonMessages.confirmPassword);
+ confirmPasswordText = this.createTextField(actioncomposite,"",true);
+ }else if (delUser.getSelection()){
+ userName = this.createLabel(actioncomposite, CommonMessages.username);
+ userNameComobox = this.createCombo(actioncomposite, nameList, false);
+ userNameComobox.select(0);
+
+ }else{
+ userName = this.createLabel(actioncomposite, CommonMessages.username);
+ userNameComobox = this.createCombo(actioncomposite, nameList, true);
+ userNameComobox.select(0);
+
+ newPassword = this.createLabel(actioncomposite, CommonMessages.newPassword);
+ newPasswordText = this.createTextField(actioncomposite, "",true);
+
+ confirmPassword = this.createLabel(actioncomposite, CommonMessages.confirmPassword);
+ confirmPasswordText = this.createTextField(actioncomposite,"",true);
+ }
+
+
+ composite.layout();
+ }
+
+ }
+
+
+
+ @Override
+ protected String getAddWizardWindowTitle() {
+ return Messages.wizardTitle_ManageAccount;
+ }
+
+ @Override
+ protected String getEditWizardWindowTitle() {
+ return Messages.wizardTitle_ManageAccount;
+ }
+
+ @Override
+ public boolean performFinish() {
+ if (addUser.getSelection()){
+ String newPwd = newPasswordText.getText();
+ String confirmPwd = confirmPasswordText.getText();
+ if (!newPwd.equals(confirmPwd)){
+ MessageDialog.openError(Display.getDefault().getActiveShell(), CommonMessages.addUser , CommonMessages.passwordNotEqual);
+ return false;
+ }
+
+ String name = userNameText.getText();
+ String groupName = groupComobox.getItem(groupComobox.getSelectionIndex());
+ manager.addUser(name, groupName, newPwd);
+ }else if (delUser.getSelection()){
+ String name = userNameComobox.getItem(userNameComobox.getSelectionIndex());
+ manager.delUser(name);
+ }else{
+ String newPwd = newPasswordText.getText();
+ String confirmPwd = confirmPasswordText.getText();
+ if (!newPwd.equals(confirmPwd)){
+ MessageDialog.openError(Display.getDefault().getActiveShell(), CommonMessages.editUser , CommonMessages.passwordNotEqual);
+ return false;
+ }
+ String groupName = groupComobox.getItem(groupComobox.getSelectionIndex());
+ String newName = userNameText.getText();
+ String oldName = userNameComobox.getItem(userNameComobox.getSelectionIndex());
+
+ manager.modifyUser(oldName, newName, groupName, newPwd);
+ }
+
+ try {
+ manager.persist();
+ } catch (Exception e) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), CommonMessages.manageAccount , CommonMessages.cannotSave);
+ return false;
+ }
+ return true;
+ }
+
+ public void addPages() {
+ addPage(new ManageAccountWizardPage(CommonMessages.manageAccount));
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ManageAccountWizard.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java Thu Apr 29 00:57:12 2010
@@ -20,13 +20,13 @@ import java.util.List;
import javax.xml.bind.JAXBElement;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.core.jaxb.JAXBUtils;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.jee.naming.MessageDestination;
import org.apache.geronimo.jee.naming.Pattern;
import org.eclipse.jface.dialogs.MessageDialog;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java Thu Apr 29 00:57:12 2010
@@ -20,11 +20,11 @@ import java.util.List;
import javax.xml.bind.JAXBElement;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.jee.application.Application;
import org.apache.geronimo.jee.application.Module;
import org.apache.geronimo.jee.application.Path;
@@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-/**
+/*
* @version $Rev$ $Date$
*/
public class ModuleWizard extends AbstractTableWizard {
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java Thu Apr 29 00:57:12 2010
@@ -23,12 +23,12 @@ import org.apache.geronimo.jee.naming.Pe
import org.apache.geronimo.jee.naming.ObjectFactory;
import org.apache.geronimo.jee.naming.Pattern;
import org.apache.geronimo.jee.naming.Property;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTreeWizard;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java Thu Apr 29 00:57:12 2010
@@ -21,11 +21,11 @@ import javax.xml.bind.JAXBElement;
import org.apache.geronimo.jee.naming.PersistenceUnitRef;
import org.apache.geronimo.jee.naming.ObjectFactory;
import org.apache.geronimo.jee.naming.Pattern;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTreeWizard;
import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java Thu Apr 29 00:57:12 2010
@@ -16,8 +16,8 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractWizard;
import org.apache.geronimo.system.plugin.model.ArtifactType;
import org.apache.geronimo.system.plugin.model.PrerequisiteType;
import org.eclipse.swt.events.ModifyEvent;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java Thu Apr 29 00:57:12 2010
@@ -16,11 +16,11 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
/**
* @version $Rev$ $Date$
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java Thu Apr 29 00:57:12 2010
@@ -16,11 +16,11 @@
*/
package org.apache.geronimo.st.v30.ui.wizards;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
/**
* @version $Rev$ $Date$
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java Thu Apr 29 00:57:12 2010
@@ -37,13 +37,13 @@ import org.apache.geronimo.jee.loginconf
import org.apache.geronimo.jee.naming.Pattern;
import org.apache.geronimo.jee.openejb.OpenejbJar;
import org.apache.geronimo.jee.web.WebApp;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.Activator;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.st.v30.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.Activator;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
@@ -67,7 +67,7 @@ import org.eclipse.swt.widgets.Text;
*/
public class SecurityRealmWizard extends AbstractTableWizard {
protected ImageDescriptor descriptor = Activator.imageDescriptorFromPlugin(
- "org.apache.geronimo.st.ui", "icons/bigG.gif");
+ "org.apache.geronimo.st.v30.ui", "icons/bigG.gif");
public SecurityRealmWizard(AbstractTableSection section) {
super(section);
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRoleMappingWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRoleMappingWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRoleMappingWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRoleMappingWizard.java Thu Apr 29 00:57:12 2010
@@ -23,12 +23,12 @@ import org.apache.geronimo.jee.security.
import org.apache.geronimo.jee.security.Principal;
import org.apache.geronimo.jee.security.RealmPrincipal;
import org.apache.geronimo.jee.security.Role;
-import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.ui.wizards.AbstractWizard;
import org.apache.geronimo.st.v30.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactory;
import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractWizard;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Combo;
@@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
/**
- * @version $Rev$ $Date$
+ * @version $Rev$ $Date$
*/
public class SecurityRoleMappingWizard extends AbstractWizard {
public static final String[] PRINCIPAL_CLASSES = {
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRunAsSubjectWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRunAsSubjectWizard.java?rev=939152&r1=939151&r2=939152&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRunAsSubjectWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRunAsSubjectWizard.java Thu Apr 29 00:57:12 2010
@@ -18,16 +18,16 @@ package org.apache.geronimo.st.v30.ui.wi
import org.apache.geronimo.jee.security.Role;
import org.apache.geronimo.jee.security.SubjectInfo;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.st.v30.ui.CommonMessages;
+import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
import org.apache.geronimo.st.v30.ui.sections.SecurityAdvancedSection;
+import org.apache.geronimo.st.v30.ui.wizards.AbstractWizard;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
/**
- * @version $Rev$ $Date$
+ * @version $Rev$ $Date$
*/
public class SecurityRunAsSubjectWizard extends AbstractWizard {
protected Combo role;