Author: dazarov
Date: 2009-11-25 07:30:32 -0500 (Wed, 25 Nov 2009)
New Revision: 18820
Removed:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/BaseFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CheckBoxFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CompositeEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/INamedElement.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ITaggedFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LinkFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TextFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelSynchronizer.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameSeamContextVariableWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectSeamProjectAction.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/ShowProjectSettingsAction.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4990
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -773,7 +773,7 @@
/**
* Package local method called by builder.
- * @param component
+ * @param seamComponent
* @param source
*/
public void registerComponents(LoadedDeclarations ds, IPath source) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2009-11-25 11:16:25
UTC (rev 18819)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2009-11-25 12:30:32
UTC (rev 18820)
@@ -39,7 +39,8 @@
org.jboss.ide.eclipse.as.core,
org.jboss.tools.jsf,
org.jboss.tools.jst.web.ui;bundle-version="2.0.0",
- org.eclipse.jst.j2ee.web;bundle-version="1.1.300"
+ org.eclipse.jst.j2ee.web;bundle-version="1.1.300",
+ org.jboss.tools.common.ui;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.seam.ui,
org.jboss.tools.seam.ui.actions,
@@ -62,7 +63,6 @@
org.jboss.tools.seam.ui.views.actions,
org.jboss.tools.seam.ui.views.properties,
org.jboss.tools.seam.ui.widget.editor,
- org.jboss.tools.seam.ui.widget.field,
org.jboss.tools.seam.ui.wizard
Bundle-Vendor: %Bundle-Vendor.0
Import-Package: com.ibm.icu.text
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -13,24 +13,6 @@
public static String
ABSTRACT_SEAM_CONTENT_PROVIDER_SEAM_PROJECT_CHANGE_EVENT_OCCURS_BUT_NO_SORCE_OF_PROJECT_PROVIDED;
- public static String BASE_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT;
-
- public static String BASE_FIELD_EDITOR_NO_LABEL;
-
- public static String BASE_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE;
-
- public static String BASE_FIELD_EDITOR_PARENT_FOR_LABEL_IS_DIFFERENT;
-
- public static String BUTTON_FIELD_EDITOR_BROWSE;
-
- public static String BUTTON_FIELD_EDITOR_NOT_IMPLEMENTED_YET;
-
- public static String COMPOSITE_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT;
-
- public static String COMPOSITE_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE;
-
- public static String COMPOSITE_EDITOR_THIS_METOD_CAN_BE_INVOKED;
-
public static String CREATE_NEW_SEAM_PROJECT;
public static String CREATE_PROJECT_ACTION_UNABLE_TO_CREATE_WIZARD;
@@ -259,10 +241,6 @@
public static String SWT_FIELD_EDITOR_FACTORY_SELECT_SEAM_HOME_FOLDER;
- public static String TEXT_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT;
-
- public static String TEXT_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE;
-
public static String VALIDATOR_FACTORY_CANNOT_FIND_SEAM_RUNTIME;
public static String VALIDATOR_FACTORY_COMPONENT_NAME_IS_NOT_VALID;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelSynchronizer.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelSynchronizer.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelSynchronizer.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -17,7 +17,7 @@
import java.util.Map;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
/**
* It is intended to collect all changes from Wizard Page and put it to
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -61,6 +61,9 @@
import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamUtil;
import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
@@ -70,10 +73,7 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import
org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
-import org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor;
import org.jboss.tools.seam.ui.wizard.SeamFormWizard;
import org.jboss.tools.seam.ui.wizard.SeamProjectWizard;
import org.jboss.tools.seam.ui.wizard.SeamWizardFactory;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2009-11-25
12:30:32 UTC (rev 18820)
@@ -137,22 +137,11 @@
SEAM_GENERATE_ENTITIES_WIZARD_CAN_NOT_FIND_SEAM_RUNTIME=Can't find seam runtime for
project {0}
ABSTRACT_SEAM_CONTENT_PROVIDER_SEAM_PROJECT_CHANGE_EVENT_OCCURS_BUT_NO_SORCE_OF_PROJECT_PROVIDED=Seam
Project change event occurs, but no soyrce of project provided
SEAM_OPEN_ACTION_OPEN=Open
-TEXT_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE=Parent control should be Composite
-TEXT_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT=Editor supports only grid layout
-BUTTON_FIELD_EDITOR_BROWSE=Browse...
-BUTTON_FIELD_EDITOR_NOT_IMPLEMENTED_YET=Not implemented yet. Please setup real acion for
editor.
SWT_FIELD_EDITOR_FACTORY_BROWS=Browse...
SWT_FIELD_EDITOR_FACTORY_SELECT_SEAM_HOME_FOLDER=Select Seam Home Folder
SWT_FIELD_EDITOR_FACTORY_ERROR=Error
SWT_FIELD_EDITOR_FACTORY_NOT_IMPLEMENTED_YET=Not implemented yet
SWT_FIELD_EDITOR_FACTORY_OK=Ok
-BASE_FIELD_EDITOR_NO_LABEL=No label
-BASE_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE=Parent control should be Composite
-BASE_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT=Editor supports only grid layout
-BASE_FIELD_EDITOR_PARENT_FOR_LABEL_IS_DIFFERENT=Parent for label is different
-COMPOSITE_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE=Parent control should be Composite
-COMPOSITE_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT=Editor supports only grid layout
-COMPOSITE_EDITOR_THIS_METOD_CAN_BE_INVOKED=This metod can be invoked after
getEditorControls(parent) only
SEAM_RUNTIME_LIST_FIELD_EDITOR_PATH_TO_SEAM_HOME_DIRECTORY_CANNOT_BE_EMPTY=Path to seam
home directory cannot be empty
SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION=The
selected seam appears to be of an incompatible version ''{0}''
SEAM_TARGET_SERVER=Target Server
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -56,6 +56,7 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.jsf.project.JSFNature;
import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.seam.core.ISeamProject;
@@ -69,7 +70,6 @@
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
import org.jboss.tools.seam.ui.wizard.IParameter;
import org.jboss.tools.seam.ui.wizard.SeamWizardFactory;
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/BaseFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/BaseFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/BaseFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Widget;
-import org.jboss.tools.seam.ui.SeamUIMessages;
-
-/**
- *
- * @author eskimo
- *
- */
-public abstract class BaseFieldEditor implements IFieldEditor {
-
- PropertyChangeSupport pcs = new PropertyChangeSupport(this);
-
- Set<DisposeListener> disposeListeners = new HashSet<DisposeListener>();
-
- private Object value = new Object();
-
- private String labelText = SeamUIMessages.BASE_FIELD_EDITOR_NO_LABEL;
-
- private String nameText = null;
-
- Label labelControl = null;
-
- protected Map<Object, Object> data = null;
-
- private boolean enabled = true;
-
- /**
- *
- * @param name
- * @param label
- * @param defaultValue
- */
- public BaseFieldEditor(String name, String label,Object defaultValue) {
- this.value = defaultValue;
- this.labelText = label;
- this.nameText = name;
- }
-
- /**
- *
- * @param parent
- */
- public void doFillIntoGrid(Object parent) {
- Assert.isTrue(parent instanceof Composite,
SeamUIMessages.BASE_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE);
- Assert.isTrue(((Composite)parent).getLayout() instanceof
GridLayout,SeamUIMessages.BASE_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT);
- Composite aComposite = (Composite) parent;
- final Control[] controls = (Control[])getEditorControls(aComposite);
- GridLayout gl = (GridLayout)((Composite)parent).getLayout();
-
- doFillIntoGrid(aComposite,gl.numColumns);
- if(controls.length>0) {
- controls[0].addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- controls[0].removeDisposeListener(this);
- }
- });
- }
- }
-
- /**
- * @param composite
- * @param numColumns
- */
- protected void doFillIntoGrid(Composite composite, int numColumns) {
-
- }
-
- /**
- *
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- pcs.addPropertyChangeListener(listener);
- }
-
- /**
- *
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- pcs.removePropertyChangeListener(listener);
- }
-
- /**
- *
- * @param parent
- * @return
- */
- public Label createLabelControl(Composite parent) {
- if(labelControl==null) {
- labelControl = new Label(parent,SWT.NO_BACKGROUND);
- labelControl.setText(this.labelText);
- } else if(parent!=null) {
- if(labelControl.getParent()!=parent)
- throw new
IllegalArgumentException(SeamUIMessages.BASE_FIELD_EDITOR_PARENT_FOR_LABEL_IS_DIFFERENT);
- }
- return labelControl;
- }
-
- /**
- *
- * @return
- */
- public Label getLabelControl() {
- return createLabelControl(null);
- }
-
- /**
- *
- */
- public abstract Object[] getEditorControls(Object composite);
-
- /**
- *
- */
- public abstract Object[] getEditorControls();
-
- /**
- *
- * @return
- */
- public Control[] getSwtControls() {
- return (Control[])getEditorControls();
- }
-
- /**
- *
- */
- public abstract int getNumberOfControls();
-
- /**
- *
- */
- public Object getValue() {
- return value;
- }
-
- /**
- *
- */
- public String getValueAsString() {
- return getValue().toString();
- }
-
- /**
- *
- */
- public boolean isEnabled() {
- return this.enabled ;
- }
-
- /**
- *
- */
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- Control[] controls = getSwtControls();
- if(controls==null) {
- return;
- }
- for(int i=0;i<controls.length;i++) {
- Control control = controls[i];
- control.setEnabled(enabled);
- if(control instanceof Composite) {
- setEnabled((Composite)control, enabled);
- }
- }
- }
-
- private void setEnabled(Composite composite, boolean enabled) {
- Control[] controls = composite.getChildren();
- for(int i=0;i<controls.length;i++) {
- Control control = controls[i];
- control.setEnabled(enabled);
- if(control instanceof Composite) {
- setEnabled((Composite)control, enabled);
- }
- }
- }
-
- /**
- *
- */
- public boolean setFocus() {
- return true;
- }
-
- /**
- *
- * @param newValue
- */
- public void setValue(Object newValue) {
- Object oldValue = value;
- value = newValue;
- pcs.firePropertyChange(nameText,oldValue,newValue);
- }
-
- /**
- *
- */
- public void setValueAsString(String stringValue) {
- value = stringValue;
- }
-
- /**
- *
- */
- public String getName() {
- return nameText;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.IFieldEditor#dispose()
- */
- public void dispose() {
- PropertyChangeListener[] listeners = pcs.getPropertyChangeListeners();
- for (int i = 0; i < listeners.length; i++) {
- PropertyChangeListener propertyChangeListener = listeners[i];
- pcs.removePropertyChangeListener(propertyChangeListener);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.IFieldEditor#dispose(org.eclipse.swt.events.DisposeEvent)
- */
- public void dispose(DisposeEvent e) {
- dispose();
- for (DisposeListener disposeListener : disposeListeners) {
- disposeListener.widgetDisposed(e);
- }
- disposeListeners.clear();
- }
-
- /*
- * (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.IFieldEditor#addDisposeListener(org.eclipse.swt.events.DisposeListener)
- */
- public void addDisposeListener(DisposeListener listener) {
- disposeListeners.add(listener);
- }
-
- /*
- * (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.IFieldEditor#removeDisposeListener(org.eclipse.swt.events.DisposeListener)
- */
- public void removeDisposeListener(DisposeListener listener) {
- disposeListeners.remove(listener);
- }
-
- /**
- *
- * @return
- */
- public String getLabelText() {
- return labelText;
- }
-
- /**
- *
- * @param labelText
- */
- public void setLabelText(String labelText) {
- this.labelText = labelText;
- }
-
- /**
- *
- */
- private boolean editable = true;
-
- /**
- *
- */
- public boolean isEditable() {
- return editable;
- }
-
- /**
- *
- */
- public void setEditable(boolean aEditable) {
- this.editable = aEditable;
- }
-
- public Object getData(Object key) {
- if(data==null) {
- return null;
- }
- return data.get(key);
- }
-
- public void setData(Object key, Object value) {
- if(data==null) {
- data = new HashMap<Object, Object>();
- }
- data.put(key, value);
- }
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.field.PushButtonField;
-
-/**
- * @author eskimo
- *
- */
-public class ButtonFieldEditor extends BaseFieldEditor {
-
- PushButtonField button= null;
-
- private ButtonPressedAction buttonAction = new
ButtonPressedAction(SeamUIMessages.BUTTON_FIELD_EDITOR_BROWSE) {
- @Override
- public void run() {
- throw new
IllegalStateException(SeamUIMessages.BUTTON_FIELD_EDITOR_NOT_IMPLEMENTED_YET);
- }
- };
-
- public ButtonFieldEditor(String name, String label) {
- super(name, label, new Object());
- }
-
- public ButtonFieldEditor(String name, ButtonPressedAction action, Object defaultValue)
{
- super(name, action.getText(), defaultValue);
- buttonAction = action;
- buttonAction.setFieldEditor(this);
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- @Override
- public Object[] getEditorControls() {
- if(button==null) {
- return null;
- }
- return new Control[]{button.getControl()};
- }
-
- @Override
- public boolean isEditable() {
- return false;
- }
-
- public void save(Object object) {
- }
-
- @Override
- public void setEditable(boolean ediatble) {
- }
-
- @Override
- public Object[] getEditorControls(Object composite) {
- if(button==null && composite!=null) {
- button = new PushButtonField((Composite)composite,buttonAction);
- setEnabled(isEnabled());
- }
- return new Control[]{button.getControl()};
- }
-
- public ButtonPressedAction getButtonaction() {
- return buttonAction;
- }
-
- public static class ButtonPressedAction extends Action implements SelectionListener{
-
- private IFieldEditor editor = null;
-
- public ButtonPressedAction(String label) {
- super(label);
- }
-
- public void setFieldEditor(IFieldEditor newEditor) {
- editor = newEditor;
- }
-
- public IFieldEditor getFieldEditor() {
- return editor;
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void widgetSelected(SelectionEvent e) {
- run();
- }
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CheckBoxFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CheckBoxFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CheckBoxFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.seam.ui.widget.field.CheckBoxField;
-
-/**
- * @author eskimo
- *
- */
-public class CheckBoxFieldEditor extends BaseFieldEditor implements
PropertyChangeListener {
-
- private Control checkBoxControl;
-
- /**
- * @param name
- * @param label
- * @param defaultValue
- */
- public CheckBoxFieldEditor(String name, String label, Object defaultValue) {
- super(name, label, defaultValue);
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.internal.project.facet.BaseFieldEditor#createEditorControls(java.lang.Object)
- */
- @Override
- public Object[] getEditorControls(Object composite) {
- return new Control[] {createCheckBoxControl((Composite)composite)};
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.internal.project.facet.BaseFieldEditor#getEditorControls()
- */
- @Override
- public Object[] getEditorControls() {
- return new Control[] {getCheckBoxControl()};
- }
-
- public Control getCheckBoxControl() {
- return createCheckBoxControl(null);
- }
-
- private Control createCheckBoxControl(Composite parent) {
- if(checkBoxControl==null) {
- CheckBoxField checkBoxFild= new CheckBoxField(parent);
- checkBoxFild.addPropertyChangeListener(this);
- checkBoxControl = checkBoxFild.getCheckBox();
- if(getValue() instanceof Boolean) {
- checkBoxFild.getCheckBox().setSelection(((Boolean)getValue()).booleanValue());
- }
- } else if(parent!=null) {
- Assert.isTrue(checkBoxControl.getParent()==parent);
- }
- return checkBoxControl;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.internal.project.facet.IFieldEditor#isEditable()
- */
- @Override
- public boolean isEditable() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.internal.project.facet.IFieldEditor#save(java.lang.Object)
- */
- public void save(Object object) {
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.internal.project.facet.IFieldEditor#setEditable(boolean)
- */
- @Override
- public void setEditable(boolean ediatble) {
- }
-
- @Override
- public void setValue(Object newValue) {
- ((Button)checkBoxControl).setSelection(Boolean.parseBoolean(newValue.toString()));
- super.setValue(newValue);
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- public void propertyChange(PropertyChangeEvent evt) {
- setValue(evt.getNewValue());
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.seam.ui.widget.field.ComboBoxField;
-
-public class ComboFieldEditor extends BaseFieldEditor implements
ITaggedFieldEditor,PropertyChangeListener{
-
- List values = null;
-
- boolean editable = false;
-
- public ComboFieldEditor(String name, String label, List values,Object
defaultValue,boolean editableSelection) {
- super(name, label, defaultValue);
- this.values = Collections.unmodifiableList(values);
- this.editable = editableSelection;
- }
-
- private ComboBoxField comboField;
-
- @Override
- public Object[] getEditorControls(Object composite) {
- return new Control[] {getComboControl((Composite)composite)};
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- public Control getComboControl(Composite composite) {
- if(comboField == null) {
- comboField = new ComboBoxField(composite,values,getValue(),editable);
- comboField.addPropertyChangeListener(this);
- final Combo combo =comboField.getComboControl();
- combo.addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- dispose(e);
- combo.removeDisposeListener(this);
- }
- });
- } else if(composite!=null) {
- Assert.isTrue(comboField.getControl().getParent()==composite);
- }
- return comboField.getControl();
- }
-
- @Override
- public Object[] getEditorControls() {
- return new Control[]{comboField.getControl()};
- }
-
- public void save(Object object) {
- }
-
- public void propertyChange(PropertyChangeEvent evt) {
- setValue(evt.getNewValue());
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
- */
- public String[] getTags() {
- return comboField.getComboControl().getItems();
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
- */
- public void setTags(String[] tags) {
- if(comboField!=null) {
- comboField.setTags(tags,getValueAsString());
- }
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#setEditable(boolean)
- */
- @Override
- public void setEditable(boolean ediatble) {
- super.setEditable(ediatble);
- comboField.setEditable(ediatble);
- }
-
- public void setValue(Object newValue) {
- if(newValue==null) {
- return;
- }
- super.setValue(newValue);
- if(comboField!=null) {
- comboField.removePropertyChangeListener(this);
- comboField.setValue(newValue.toString());
- comboField.addPropertyChangeListener(this);
- }
- }
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CompositeEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CompositeEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/CompositeEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.seam.ui.SeamUIMessages;
-
-/**
- * @author eskimo
- *
- */
-public class CompositeEditor extends BaseFieldEditor implements PropertyChangeListener {
-
- public CompositeEditor(String name, String label, Object defaultValue) {
- super(name, label, defaultValue);
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- Assert.isTrue(parent instanceof Composite,
- SeamUIMessages.COMPOSITE_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE);
- Assert.isTrue(((Composite) parent).getLayout() instanceof GridLayout,
- SeamUIMessages.COMPOSITE_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT);
-
- Composite aComposite = (Composite) parent;
- final Control[] controls = (Control[]) getEditorControls(aComposite);
- GridLayout gl = (GridLayout) ((Composite) parent).getLayout();
-
- for (int i = 0; i < controls.length; i++) {
- GridData gd = new GridData();
- gd.horizontalSpan = i == 1 ? gl.numColumns - controls.length + 1 : 1;
- if (controls[i] instanceof Combo && i == (controls.length - 1)) {
- gd.horizontalAlignment = SWT.BEGINNING;
- } else {
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = (i == 1);
- }
-
- controls[i].setLayoutData(gd);
- controls[i].setEnabled(isEnabled());
-
- if(i==0) {
- controls[i].addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- controls[0].removeDisposeListener(this);
- }
- });
- }
- }
- }
-
- List<Control> controls = new ArrayList<Control>();
-
- @Override
- public Object[] getEditorControls() {
- if(!controls.isEmpty()) return controls.toArray();
- else throw new
IllegalStateException(SeamUIMessages.COMPOSITE_EDITOR_THIS_METOD_CAN_BE_INVOKED);
- }
-
- @Override
- public Object[] getEditorControls(Object parent) {
- for (IFieldEditor editor : editors) {
- controls.addAll(Arrays.asList((Control[])editor.getEditorControls(parent)));
- }
- return controls.toArray(new Control[]{});
- }
-
- @Override
- public int getNumberOfControls() {
- return editors.size();
- }
-
- @Override
- public boolean isEditable() {
- return true;
- }
-
- public void save(Object object) {
- }
-
- @Override
- public void setEditable(boolean ediatble) {
- }
-
- List<IFieldEditor> editors = new ArrayList<IFieldEditor>();
-
- public CompositeEditor addFieldEditors(IFieldEditor[] editors) {
- this.editors.addAll( Arrays.asList(editors));
- for (IFieldEditor editor : Arrays.asList(editors)) {
- editor.addPropertyChangeListener(this);
- }
- return this;
- }
-
- @Override
- public void setValue(Object newValue) {
- for (IFieldEditor editor : editors) {
- editor.removePropertyChangeListener(this);
- editor.setValue(newValue);
- editor.addPropertyChangeListener(this);
- }
- super.setValue(newValue);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- for (IFieldEditor editor : editors) {
- if(event.getSource()!=editor) {
- editor.removePropertyChangeListener(this);
- editor.setValue(event.getNewValue());
- editor.addPropertyChangeListener(this);
- }
- }
- super.setValue(event.getNewValue());
- }
-
- @Override
- public void setEnabled(boolean set) {
- for (IFieldEditor editor : editors) {
- editor.setEnabled(set);
- }
- }
-
- public List<IFieldEditor> getEditors() {
- return Collections.unmodifiableList(editors);
- }
-
- public IFieldEditor getEditorByName(String name) {
- for (IFieldEditor editor : editors) {
- if(name.equals(editor.getName())) {
- return editor;
- }
- }
- return null;
- }
-
- public void setData(Object key, Object value) {
- super.setData(key, value);
- for (IFieldEditor editor : editors) {
- editor.setData(key, value);
- }
- }
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeListener;
-
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Listener;
-
-public interface IFieldEditor extends INamedElement {
-
- /**
- *
- * @param composite
- */
- public Object[] getEditorControls(Object composite);
-
- /**
- *
- * @return
- */
- public Object[] getEditorControls();
-
- /**
- *
- * @return
- */
- public int getNumberOfControls();
-
- /**
- *
- * @param parent
- */
- public void doFillIntoGrid(Object parent);
-
- /**
- *
- * @param listener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener);
-
- /**
- *
- * @param listener
- */
- public void addDisposeListener(DisposeListener listener);
-
- /**
- *
- * @param listener
- */
- public void removeDisposeListener(DisposeListener listener);
-
- /**
- *
- * @param listener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener);
-
- /**
- *
- * @return
- */
- public boolean isEditable();
-
- /**
- *
- * @param aEdiatble
- */
- public void setEditable(boolean aEdiatble);
-
- /**
- * @return
- *
- */
- public boolean setFocus();
-
- /**
- *
- * @return
- */
- public boolean isEnabled();
-
- /**
- *
- * @param enabled
- */
- public void setEnabled(boolean enabled);
-
- /**
- *
- */
- public void dispose();
-
- /**
- *
- * @param e
- */
- public void dispose(DisposeEvent e);
-
- /**
- * Sets the application defined property of this editor
- * @param data
- * @param key
- */
- public void setData(Object key, Object data);
-
- /**
- * Gets the application defined property of this editor
- * @param key
- * @return
- */
- public Object getData(Object key);
-}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -12,8 +12,11 @@
import java.util.List;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
public interface IFieldEditorFactory {
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/INamedElement.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/INamedElement.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/INamedElement.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-public interface INamedElement {
-
- public abstract String getName();
-
- /**
- *
- * @return
- */
- public abstract Object getValue();
-
- /**
- *
- */
- public abstract void setValue(Object newValue);
-
- /**
- *
- * @return
- */
- public abstract String getValueAsString();
-
- /**
- *
- * @param aValue
- */
- public abstract void setValueAsString(String aValue);
-
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ITaggedFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ITaggedFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ITaggedFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-/**
- * @author eskimo
- *
- */
-public interface ITaggedFieldEditor extends IFieldEditor {
-
- /**
- *
- * @return
- */
- public String[] getTags();
-
- /**
- *
- * @param tags
- */
- public void setTags(String[] tags);
-}
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.seam.ui.widget.editor;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author eskimo
- *
- */
-public class LabelFieldEditor extends BaseFieldEditor {
-
- public LabelFieldEditor(String name, String label) {
- super(name, label, ""); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#doFillIntoGrid(java.lang.Object)
- */
- @Override
- public void doFillIntoGrid(Object parent) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getEditorControls(java.lang.Object)
- */
- @Override
- public Object[] getEditorControls(Object composite) {
- // TODO Auto-generated method stub
- return new Control[]{createLabelControl((Composite)composite)};
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getEditorControls()
- */
- @Override
- public Object[] getEditorControls() {
- return getEditorControls(null);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.IFieldEditor#isEditable()
- */
- @Override
- public boolean isEditable() {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.IFieldEditor#save(java.lang.Object)
- */
- public void save(Object object) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.IFieldEditor#setEditable(boolean)
- */
- @Override
- public void setEditable(boolean ediatble) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void setValue(Object value) {
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
- */
- @Override
- public int getNumberOfControls() {
- // TODO Auto-generated method stub
- return 1;
- }
-}
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LinkFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LinkFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LinkFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,67 +0,0 @@
-package org.jboss.tools.seam.ui.widget.editor;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
-import org.jboss.tools.seam.ui.widget.field.LinkField;
-
-public class LinkFieldEditor extends BaseFieldEditor {
- LinkField link;
-
- private ButtonPressedAction buttonAction = new
ButtonPressedAction(SeamUIMessages.BUTTON_FIELD_EDITOR_BROWSE) {
- @Override
- public void run() {
- throw new
IllegalStateException(SeamUIMessages.BUTTON_FIELD_EDITOR_NOT_IMPLEMENTED_YET);
- }
- };
-
- public LinkFieldEditor(String name, String label) {
- super(name, label, new Object());
- }
-
- public LinkFieldEditor(String name, ButtonPressedAction action, Object defaultValue) {
- super(name, action.getText(), defaultValue);
- buttonAction = action;
- buttonAction.setFieldEditor(this);
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- @Override
- public Object[] getEditorControls() {
- return new Control[]{link.getControl()};
- }
-
- @Override
- public boolean isEditable() {
- return false;
- }
-
- public void save(Object object) {
- }
-
- @Override
- public void setEditable(boolean ediatble) {
- }
-
- @Override
- public Object[] getEditorControls(Object composite) {
- if(link == null && composite != null) {
- link = new LinkField((Composite)composite, buttonAction);
- }
- return new Control[]{link.getControl()};
- }
-
- public ButtonPressedAction getButtonaction() {
- return buttonAction;
- }
-
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-
-}
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,108 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.seam.ui.widget.field.RadioField;
-
-/**
- *
- * @author Viacheslav Kabanovich
- */
-public class RadioFieldEditor extends BaseFieldEditor implements
ITaggedFieldEditor,PropertyChangeListener{
- List values = null;
- List<String> labels;
-
- RadioField radioField;
-
- public RadioFieldEditor(String name, String label, List<String> labels, List
values,Object defaultValue) {
- super(name, label, defaultValue);
- this.labels = labels;
- this.values = Collections.unmodifiableList(values);
- }
-
- @Override
- public Object[] getEditorControls(Object composite) {
- return new Control[] {getComboControl((Composite)composite)};
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- public Control getComboControl(Composite composite) {
- if(radioField == null) {
- radioField = new RadioField(composite,labels, values,getValue(), false);
- radioField.addPropertyChangeListener(this);
- } else if(composite!=null) {
- Assert.isTrue(radioField.getControl().getParent()==composite);
- }
- return radioField.getControl();
- }
-
- @Override
- public Object[] getEditorControls() {
- return new Control[]{radioField.getControl()};
- }
-
- public void save(Object object) {
- }
-
- public void propertyChange(PropertyChangeEvent evt) {
- setValue(evt.getNewValue());
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
- */
- public String[] getTags() {
- String[] result = new String[values.size()];
- for (int i = 0; i < result.length; i++) result[i] = values.get(0).toString();
- return result;
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
- */
- public void setTags(String[] tags) {
- values.clear();
- for (int i = 0; i < tags.length; i++) values.add(tags[i]);
- //TODO
-// radioField.setTags(tags,getValueAsString());
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-
- public void setValue(Object newValue) {
- if(newValue==null) {
- return;
- }
- super.setValue(newValue);
- if(radioField!=null) {
- radioField.removePropertyChangeListener(this);
- radioField.setValue(newValue.toString());
- radioField.addPropertyChangeListener(this);
- }
- }
-}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -59,6 +59,8 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TableColumn;
+import org.jboss.tools.common.ui.widget.editor.BaseFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamUtil;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -44,11 +44,22 @@
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.CheckBoxFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ComboFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.LabelFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.LinkFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.TaggedComboFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.TaggedRadioFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.TextFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
import org.jboss.tools.seam.ui.wizard.IParameter;
/**
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.swt.widgets.Combo;
-
-/**
- *
- */
-public class TaggedComboFieldEditor extends CompositeEditor implements
ITaggedFieldEditor, PropertyChangeListener{
-
- List values = null;
-
- boolean floatStyle = true;
-
- ComboFieldEditor combo = null;
-
- public TaggedComboFieldEditor(String name, String label, List values,
- Object defaultValue, boolean editable) {
-
- super(name, label, defaultValue==null?"":defaultValue.toString());
//$NON-NLS-1$
- this.values = Collections.unmodifiableList(values);
- this.floatStyle = editable;
- combo = new ComboFieldEditor(
- name,label,values,getValue(),editable);
- addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,label),
- combo});
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
- */
- public String[] getTags() {
- return ((Combo)getEditorControls()[1]).getItems();
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
- */
- public void setTags(String[] tags) {
- combo.setTags(tags);
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#setEditable(boolean)
- */
- @Override
- public void setEditable(boolean ediatble) {
- combo.setEditable(ediatble);
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#isEditable()
- */
- @Override
- public boolean isEditable() {
- return combo.isEditable();
- }
-}
\ No newline at end of file
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,68 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-/**
- *
- * @author Viacheslav Kabanovich
- */
-public class TaggedRadioFieldEditor extends CompositeEditor implements
ITaggedFieldEditor, PropertyChangeListener{
-
- List values = null;
- RadioFieldEditor radios = null;
-
- public TaggedRadioFieldEditor(String name, String label, List<String> labels, List
values,
- Object defaultValue) {
-
- super(name, label, defaultValue==null?"":defaultValue.toString());
//$NON-NLS-1$
- this.values = Collections.unmodifiableList(values);
- radios = new RadioFieldEditor(
- name,label,labels, values,getValue());
- addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,label),
- radios});
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
- */
- public String[] getTags() {
- return radios.getTags();
- }
-
- /* (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
- */
- public void setTags(String[] tags) {
- radios.setTags(tags);
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#setEditable(boolean)
- */
- @Override
- public void setEditable(boolean ediatble) {
- radios.setEditable(ediatble);
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#isEditable()
- */
- @Override
- public boolean isEditable() {
- return radios.isEditable();
- }
-}
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TextFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TextFieldEditor.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TextFieldEditor.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.widget.editor;
-
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.Collection;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.field.TextField;
-
-/**
- *
- * @author eskimo(dgolovin(a)exadel.com)
- *
- */
-public class TextFieldEditor extends BaseFieldEditor implements PropertyChangeListener{
-
- /**
- *
- */
- public static final int UNLIMITED = -1;
-
- protected int style = -1;
-
- /**
- *
- * @param name
- * @param aLabelText
- * @param defaultvalue
- */
- public TextFieldEditor(String name,String aLabelText,String defaultvalue) {
- super(name, aLabelText, defaultvalue);
- }
-
- /**
- *
- * @param name
- * @param aLabelText
- * @param defaultvalue
- * @param editable
- */
- public TextFieldEditor(String name,String aLabelText,String defaultvalue,boolean
editable) {
- super(name, aLabelText, defaultvalue);
- setEditable(editable);
- }
-
- /**
- *
- */
- protected TextField fTextField = null;
-
- /**
- *
- */
- protected int fWidthInChars = 0;
-
- /**
- *
- */
- @Override
- public Object[] getEditorControls() {
- return new Control[] {getTextControl()};
- }
-
- /*
- * (non-Javadoc)
- * @see
org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#doFillIntoGrid(java.lang.Object)
- */
- @Override
- public void doFillIntoGrid(Object aParent) {
- Assert.isTrue(aParent instanceof Composite,
SeamUIMessages.TEXT_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE);
- Assert.isTrue(((Composite)aParent).getLayout() instanceof
GridLayout,SeamUIMessages.TEXT_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT);
- Composite aComposite = (Composite) aParent;
- Control[] controls = (Control[])getEditorControls(aComposite);
- GridLayout gl = (GridLayout)((Composite)aParent).getLayout();
- getTextControl(aComposite);
-
- GridData gd = new GridData();
-
- gd.horizontalSpan = gl.numColumns - 1;
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
-
- fTextField.getTextControl().setLayoutData(gd);
- }
-
- /**
- *
- * @param parent
- * @return
- */
- public Text getTextControl(Composite parent) {
- if (fTextField == null) {
- fTextField = new TextField(parent, getInitialStyle());
- Text textField = fTextField.getTextControl();
- textField.setFont(parent.getFont());
- Object value = getValue();
- textField.setText(getValue().toString());
- textField.setEditable(isEditable());
- textField.setEnabled(isEnabled());
- fTextField.addPropertyChangeListener(this);
- } else if (parent!=null){
- Assert.isTrue(parent==fTextField.getTextControl().getParent());
- }
- return fTextField.getTextControl();
- }
-
- /**
- *
- */
- protected void updateWidgetValues() {
- setValueAsString(getValueAsString());
- }
-
- /**
- *
- * @return
- */
- protected int getInitialStyle() {
- if(this.style >= 0) return style;
- return SWT.SINGLE | SWT.BORDER;
- }
-
- /*
- * @param value
- * @return
- */
- private String checkCollection(Object value){
-
- return value != null && (!((Collection)value).isEmpty()) ?
prepareCollectionToString((Collection)value) : ""; //$NON-NLS-1$
- }
-
- /*
- * @param collection
- * @return
- */
- private String prepareCollectionToString(Collection collection)
- {
- String stringValue = ""; //$NON-NLS-1$
- Object[] objects = collection.toArray();
- for(int i = 0; i < objects.length; i++){
- stringValue += objects[i];
- if(i < objects.length - 1)
- stringValue += " "; //$NON-NLS-1$
- }
- return stringValue;
- }
-
-
- /*
- * @param value
- * @return
- */
- private String checkSimple(Object value){
- return (value != null) ? value.toString() : ""; //$NON-NLS-1$
- }
-
- /**
- *
- */
- @Override
- public int getNumberOfControls() {
- return 2;
- }
-
- /**
- * Returns this field editor's text control.
- *
- * @return the text control, or <code>null</code> if no
- * text field is created yet
- */
- protected Text getTextControl() {
- return fTextField!=null?fTextField.getTextControl():null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#setFocus()
- */
- @Override
- public boolean setFocus() {
- boolean setfocus = false;
- if(fTextField!=null && !fTextField.getTextControl().isDisposed())
- setfocus = fTextField.getTextControl().setFocus();
- return setfocus;
- }
-
- /**
- *
- */
- @Override
- public Object[] getEditorControls(Object composite) {
- return new Control[]{getTextControl((Composite)composite)};
- }
-
- /**
- *
- * @param object
- */
- public void save(Object object) {
- }
-
- /**
- *
- */
- @Override
- public void setValue(Object newValue) {
- super.setValue(newValue);
- if(fTextField!=null){
- fTextField.removePropertyChangeListener(this);
- fTextField.getTextControl().setText(newValue.toString());
- fTextField.addPropertyChangeListener(this);
- }
- }
-
- /**
- *
- */
- @Override
- public void setEditable(boolean aEditable) {
- super.setEditable(aEditable);
- if(getTextControl()!=null) getTextControl().setEditable(aEditable);
- }
-
- /**
- *
- */
- public void propertyChange(PropertyChangeEvent evt) {
- super.setValue(evt.getNewValue());
- }
-}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -26,6 +26,8 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -33,8 +35,6 @@
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
/**
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameSeamContextVariableWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameSeamContextVariableWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameSeamContextVariableWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -26,6 +26,8 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import
org.jboss.tools.seam.internal.core.refactoring.RenameSeamContextVariableProcessor;
@@ -33,8 +35,6 @@
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
/**
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -20,10 +20,10 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
/**
*
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -40,6 +40,7 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
@@ -47,7 +48,6 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetFilterSetFactory;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
import org.osgi.service.prefs.BackingStoreException;
/**
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -38,6 +38,9 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.LabelFieldEditor;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -46,9 +49,6 @@
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
-import org.jboss.tools.seam.ui.widget.editor.LabelFieldEditor;
/**
* @author eskimo
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -20,11 +20,11 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
import org.jboss.tools.seam.core.SeamUtil;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
public class SeamConversationWizard extends SeamBaseWizard implements INewWizard {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -20,11 +20,11 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
/**
* @author eskimo
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -28,6 +28,7 @@
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -36,7 +37,6 @@
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
/**
* @author eskimo
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -20,10 +20,10 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
/**
*
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizard.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizard.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -40,6 +40,7 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -50,7 +51,6 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
/**
* Seam Generate Entities Wizard.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -35,6 +35,9 @@
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.INamedElement;
+import org.jboss.tools.common.ui.widget.field.RadioField;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -42,9 +45,6 @@
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
-import org.jboss.tools.seam.ui.widget.editor.INamedElement;
-import org.jboss.tools.seam.ui.widget.field.RadioField;
/**
* @author Alexey Kazakov
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -33,6 +33,11 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ComboFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
@@ -41,12 +46,7 @@
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor;
-import org.jboss.tools.seam.ui.widget.editor.ComboFieldEditor;
-import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
-import org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor;
import
org.jboss.tools.seam.ui.widget.editor.SeamRuntimeListFieldEditor.SeamRuntimeNewWizard;
/**
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -25,10 +25,10 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor;
/**
* @author Alexey Kazakov
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectSeamProjectAction.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectSeamProjectAction.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectSeamProjectAction.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -16,8 +16,8 @@
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.dialogs.ListDialog;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor;
public class SelectSeamProjectAction extends ButtonFieldEditor.ButtonPressedAction {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/ShowProjectSettingsAction.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/ShowProjectSettingsAction.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/ShowProjectSettingsAction.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -9,10 +9,10 @@
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.SeamUIMessages;
-import org.jboss.tools.seam.ui.widget.editor.ButtonFieldEditor;
-import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
public class ShowProjectSettingsAction extends ButtonFieldEditor.ButtonPressedAction
implements PropertyChangeListener {
IFieldEditor editor;
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2009-11-25 11:16:25
UTC (rev 18819)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2009-11-25 12:30:32
UTC (rev 18820)
@@ -39,7 +39,8 @@
org.jboss.tools.jst.jsp.test,
org.eclipse.jdt.ui,
org.jboss.tools.vpe.ui.test,
- org.jboss.tools.common.el.core;bundle-version="2.0.0"
+ org.jboss.tools.common.el.core;bundle-version="2.0.0",
+ org.jboss.tools.common.ui;bundle-version="1.0.0"
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.ca,
org.jboss.tools.seam.ui.test.hyperlink,
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -25,6 +25,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.preference.PreferenceDialog;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
@@ -33,7 +34,6 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.preferences.SeamPreferencesMessages;
import org.jboss.tools.seam.ui.preferences.SeamSettingsPreferencePage;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.WorkbenchUtils;
import org.osgi.framework.Bundle;
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -39,12 +39,12 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.wizard.IParameter;
import org.jboss.tools.seam.ui.wizard.SeamWizardFactory;
import org.jboss.tools.seam.ui.wizard.SeamWizardUtils;
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -19,9 +19,9 @@
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.seam.ui.ISeamUiConstants;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.wizard.IParameter;
import org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
/**
* @author eskimo
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java 2009-11-25
11:16:25 UTC (rev 18819)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java 2009-11-25
12:30:32 UTC (rev 18820)
@@ -17,9 +17,9 @@
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.seam.ui.ISeamUiConstants;
-import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage;
/**