JBoss Tools SVN: r18820 - in trunk/seam: plugins/org.jboss.tools.seam.ui/META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
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;
/**
15 years, 1 month
JBoss Tools SVN: r18819 - in trunk/common/plugins/org.jboss.tools.common.ui: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-11-25 06:16:25 -0500 (Wed, 25 Nov 2009)
New Revision: 18819
Added:
trunk/common/plugins/org.jboss.tools.common.ui/.classpath
trunk/common/plugins/org.jboss.tools.common.ui/.project
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.ui/build.properties
trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
trunk/common/plugins/org.jboss.tools.common.ui/src/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/BaseFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ButtonFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CheckBoxFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ComboFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CompositeEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/IFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/INamedElement.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ITaggedFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LabelFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LinkFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/RadioFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedComboFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedRadioFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TextFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/BaseField.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/CheckBoxField.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/ComboBoxField.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/LinkField.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/PushButtonField.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/RadioField.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/TextField.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4990
Added: trunk/common/plugins/org.jboss.tools.common.ui/.classpath
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/.classpath (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/.classpath 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/.project
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/.project (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/.project 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Common Ui
+Bundle-SymbolicName: org.jboss.tools.common.ui
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.osgi;bundle-version="3.5.0",
+ org.jboss.tools.common;bundle-version="2.0.0",
+ org.eclipse.ui;bundle-version="3.5.0",
+ org.eclipse.core.runtime;bundle-version="3.5.0"
+Export-Package: org.jboss.tools.common.ui.widget.editor,
+ org.jboss.tools.common.ui.widget.field
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/build.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/build.properties 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,3 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.common.ui
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = Common UI Plug-in
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class CommonUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.ui.messages";//$NON-NLS-1$
+
+ private CommonUIMessages() {
+ // Do not instantiate
+ }
+
+ 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 TEXT_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT;
+
+ public static String TEXT_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE;
+
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, CommonUIMessages.class);
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.common.ui;
+
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CommonUIPlugin extends BaseUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.common.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static CommonUIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public CommonUIPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static CommonUIPlugin getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,12 @@
+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
+BUTTON_FIELD_EDITOR_BROWSE=Browse...
+BUTTON_FIELD_EDITOR_NOT_IMPLEMENTED_YET=Not implemented yet. Please setup real acion for editor.
+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
+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
+
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/BaseFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/BaseFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/BaseFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,329 @@
+/*******************************************************************************
+ * 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.common.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.common.ui.CommonUIMessages;
+
+/**
+ *
+ * @author eskimo
+ *
+ */
+public abstract class BaseFieldEditor implements IFieldEditor {
+
+ protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+
+ Set<DisposeListener> disposeListeners = new HashSet<DisposeListener>();
+
+ private Object value = new Object();
+
+ private String labelText = CommonUIMessages.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, CommonUIMessages.BASE_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE);
+ Assert.isTrue(((Composite)parent).getLayout() instanceof GridLayout,CommonUIMessages.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(CommonUIMessages.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/BaseFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ButtonFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ButtonFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ButtonFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * 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.common.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.common.ui.CommonUIMessages;
+import org.jboss.tools.common.ui.widget.field.PushButtonField;
+
+/**
+ * @author eskimo
+ *
+ */
+public class ButtonFieldEditor extends BaseFieldEditor {
+
+ PushButtonField button= null;
+
+ private ButtonPressedAction buttonAction = new ButtonPressedAction(CommonUIMessages.BUTTON_FIELD_EDITOR_BROWSE) {
+ @Override
+ public void run() {
+ throw new IllegalStateException(CommonUIMessages.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ButtonFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CheckBoxFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CheckBoxFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CheckBoxFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * 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.common.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.common.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CheckBoxFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ComboFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ComboFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ComboFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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.common.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.common.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ComboFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CompositeEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CompositeEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CompositeEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * 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.common.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.common.ui.CommonUIMessages;
+
+/**
+ * @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,
+ CommonUIMessages.COMPOSITE_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE);
+ Assert.isTrue(((Composite) parent).getLayout() instanceof GridLayout,
+ CommonUIMessages.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(CommonUIMessages.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/CompositeEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/IFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/IFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/IFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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.common.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/IFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/INamedElement.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/INamedElement.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/INamedElement.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.common.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/INamedElement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ITaggedFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ITaggedFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ITaggedFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.common.ui.widget.editor;
+
+/**
+ * @author eskimo
+ *
+ */
+public interface ITaggedFieldEditor extends IFieldEditor {
+
+ /**
+ *
+ * @return
+ */
+ public String[] getTags();
+
+ /**
+ *
+ * @param tags
+ */
+ public void setTags(String[] tags);
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/ITaggedFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LabelFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LabelFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LabelFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * 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.common.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;
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LabelFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LinkFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LinkFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LinkFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,67 @@
+package org.jboss.tools.common.ui.widget.editor;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.jboss.tools.common.ui.CommonUIMessages;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
+import org.jboss.tools.common.ui.widget.field.LinkField;
+
+public class LinkFieldEditor extends BaseFieldEditor {
+ LinkField link;
+
+ private ButtonPressedAction buttonAction = new ButtonPressedAction(CommonUIMessages.BUTTON_FIELD_EDITOR_BROWSE) {
+ @Override
+ public void run() {
+ throw new IllegalStateException(CommonUIMessages.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;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/LinkFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/RadioFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/RadioFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/RadioFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,108 @@
+ /*******************************************************************************
+ * 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.common.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.common.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);
+ }
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/RadioFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedComboFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedComboFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedComboFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.common.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedComboFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedRadioFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedRadioFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedRadioFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,68 @@
+ /*******************************************************************************
+ * 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.common.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();
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TaggedRadioFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TextFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TextFieldEditor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TextFieldEditor.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * 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.common.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.common.ui.CommonUIMessages;
+import org.jboss.tools.common.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, CommonUIMessages.TEXT_FIELD_EDITOR_PARENT_CONTROL_SHOULD_BE_COMPOSITE);
+ Assert.isTrue(((Composite)aParent).getLayout() instanceof GridLayout,CommonUIMessages.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
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/editor/TextFieldEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/BaseField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/BaseField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/BaseField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.common.ui.widget.field;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+import org.eclipse.swt.widgets.Control;
+
+public abstract class BaseField {
+
+ public static final String PROPERTY_NAME = "value"; //$NON-NLS-1$
+
+ private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ pcs.addPropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ pcs.removePropertyChangeListener(listener);
+ }
+
+ public void firePropertyChange(Object oldValue, Object newValue) {
+ pcs.firePropertyChange(PROPERTY_NAME, oldValue, newValue);
+ }
+
+ abstract public Control getControl();
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/BaseField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/CheckBoxField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/CheckBoxField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/CheckBoxField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.common.ui.widget.field;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class CheckBoxField extends BaseField implements SelectionListener {
+ private Button checkBox = null;
+
+ public CheckBoxField(Composite parent) {
+ checkBox = new Button(parent, SWT.CHECK);
+ checkBox.addSelectionListener(this);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ checkBox.getSelection();
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ firePropertyChange(!checkBox.getSelection(),
+ checkBox.getSelection());
+ }
+
+ public Button getCheckBox() {
+ return checkBox;
+ }
+
+ @Override
+ public Control getControl() {
+ return getCheckBox();
+ }
+
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/CheckBoxField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/ComboBoxField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/ComboBoxField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/ComboBoxField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * 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.common.ui.widget.field;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author eskimo
+ *
+ */
+public class ComboBoxField extends BaseField implements ISelectionChangedListener {
+
+ ComboViewer comboControl = null;
+ List values = new ArrayList();
+
+ public ComboBoxField(Composite parent,List values, ILabelProvider labelProvider,
+ Object value, boolean flatStyle) {
+ this(parent, values, value, flatStyle);
+ comboControl.setLabelProvider(labelProvider);
+ }
+
+ public ComboBoxField(Composite parent,List values, Object value, boolean editable) {
+ this.values = values;
+ /*
+ * Used combo box instead of custom combobox(CCombo),
+ * CCombo looks ugly under MAC OS X
+ */
+ Combo combo;
+ if(editable==true) {
+
+ combo = new Combo(parent, SWT.DROP_DOWN);
+ } else {
+ combo = new Combo(parent, SWT.READ_ONLY);
+ }
+ combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ comboControl = new ComboViewer(combo);
+ comboControl.setContentProvider(new IStructuredContentProvider() {
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput,
+ Object newInput) {
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return ComboBoxField.this.values.toArray();
+ }
+ });
+
+ comboControl.addSelectionChangedListener(this);
+ comboControl.getCombo().addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ firePropertyChange(new Object(), comboControl.getCombo().getText());
+ }});
+ comboControl.setLabelProvider(new ILabelProvider() {
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ public String getText(Object element) {
+ return element.toString();
+ }
+ });
+ comboControl.setInput(values);
+ comboControl.setSelection(new StructuredSelection(value), true);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ firePropertyChange("", ((StructuredSelection)event.getSelection()).getFirstElement()); //$NON-NLS-1$
+ }
+
+ public Combo getComboControl() {
+ return comboControl.getCombo();
+ }
+
+ @Override
+ public Control getControl() {
+ return getComboControl();
+ }
+
+ public void setValue(Object newValue) {
+ comboControl.setSelection(new StructuredSelection(newValue));
+ comboControl.getCombo().setText(newValue.toString());
+ }
+
+ public void setTags(String[] tags,String value) {
+ values = Arrays.asList(tags);
+ comboControl.removeSelectionChangedListener(this);
+ comboControl.refresh(true);
+ comboControl.addPostSelectionChangedListener(this);
+ comboControl.setSelection(new StructuredSelection(value));
+ }
+ /*
+ * We can't modify combo, change style of this object,
+ * if we such functionality please use CCombo
+ *
+ */
+ public void setEditable(
+ boolean ediatble) {
+ //comboControl.getCCombo().setEditable(false);
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/ComboBoxField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/LinkField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/LinkField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/LinkField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,28 @@
+package org.jboss.tools.common.ui.widget.field;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
+
+public class LinkField extends BaseField {
+
+ Link link;
+
+ /**
+ *
+ */
+ @Override
+ public Control getControl() {
+ return link;
+ }
+
+
+ public LinkField(Composite composite, ButtonPressedAction listener) {
+ link = new Link(composite,SWT.NONE);
+ link.setText(listener.getText());
+ link.addSelectionListener(listener);
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/LinkField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/PushButtonField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/PushButtonField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/PushButtonField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.common.ui.widget.field;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
+
+/**
+ * @author eskimo
+ *
+ */
+public class PushButtonField extends BaseField {
+
+ Button button;
+
+ /**
+ *
+ */
+ @Override
+ public Control getControl() {
+ return button;
+ }
+
+
+ public PushButtonField(Composite composite, ButtonPressedAction listener) {
+ button = new Button(composite,SWT.PUSH);
+ button.setText(listener.getText());
+ button.addSelectionListener(listener);
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/PushButtonField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/RadioField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/RadioField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/RadioField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,102 @@
+ /*******************************************************************************
+ * 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.common.ui.widget.field;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+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.Control;
+
+/**
+ * A group of labels and radio buttons.
+ * @author Alexey Kazakov
+ */
+public class RadioField extends BaseField implements SelectionListener {
+
+ private Composite topComposite;
+ private Button[] radios;
+ private Object value;
+
+ public RadioField(Composite parent, List<String> labels, List<Object> values, Object defaultValue, boolean verticalLayout) {
+ topComposite = new Composite(parent, SWT.NONE);
+ topComposite.setLayout(new GridLayout(verticalLayout ? 1 : values.size(), false));
+ if(verticalLayout) {
+ topComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ }
+
+ radios = new Button[values.size()];
+ if(defaultValue==null && !values.isEmpty()) {
+ defaultValue = values.get(0);
+ }
+ for (int i = 0; i < radios.length; i++) {
+ radios[i] = new Button(topComposite, SWT.RADIO);
+ radios[i].setText(labels.get(i));
+ radios[i].addSelectionListener(this);
+ radios[i].setLayoutData(new GridData(verticalLayout ? GridData.FILL_HORIZONTAL : GridData.BEGINNING));
+ Object value = values.get(i);
+ radios[i].setData(value);
+ if(value != null && value.equals(defaultValue)) {
+ radios[i].setSelection(true);
+ this.value = value;
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.field.BaseField#getControl()
+ */
+ @Override
+ public Control getControl() {
+ return topComposite;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ public void widgetSelected(SelectionEvent event) {
+ value = event.widget.getData();
+ firePropertyChange("", value); //$NON-NLS-1$
+ }
+
+ /**
+ * @return Value of selected button
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ *
+ * @param value
+ */
+ public void setValue(String value) {
+ this.value = value;
+ for (int i = 0; i < radios.length; i++) {
+ if(value.equals(radios[i].getData())) {
+ radios[i].setSelection(true);
+ } else {
+ radios[i].setSelection(false);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/RadioField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/TextField.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/TextField.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/TextField.java 2009-11-25 11:16:25 UTC (rev 18819)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.common.ui.widget.field;
+
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+
+public class TextField extends BaseField implements ModifyListener{
+
+
+ Text textField = null;
+
+ public TextField(Composite parent, int style) {
+ textField = new Text(parent,style);
+ textField.addModifyListener(this);
+ }
+
+ public void modifyText(ModifyEvent e) {
+ firePropertyChange(new Object(),((Text)e.widget).getText().trim());
+ }
+
+ public Text getTextControl() {
+ return textField;
+ }
+
+ @Override
+ public Control getControl() {
+ return getTextControl();
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/widget/field/TextField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month
JBoss Tools SVN: r18817 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-11-25 06:13:08 -0500 (Wed, 25 Nov 2009)
New Revision: 18817
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/XulRunnerEditor2.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5184, new class from Snjezana Peco has been commited
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/XulRunnerEditor2.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/XulRunnerEditor2.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/XulRunnerEditor2.java 2009-11-25 11:13:08 UTC (rev 18817)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.mozilla;
+
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.vpe.xulrunner.XulRunnerException;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.mozilla.interfaces.nsIDOMElement;
+
+public class XulRunnerEditor2 extends XulRunnerEditor {
+
+ private MozillaEditor mozillaEditor;
+
+ public XulRunnerEditor2(Composite parent, MozillaEditor mozillaEditor) throws XulRunnerException {
+ super(parent);
+ this.mozillaEditor = mozillaEditor;
+ }
+
+ public void onLoadWindow() {
+ if (mozillaEditor == null) {
+ return;
+ }
+ // if the first load page
+ if (!mozillaEditor.isRefreshPage()) {
+ super.onLoadWindow();
+// MozillaEditor.this.onLoadWindow();
+ }
+ // if only refresh page
+ else {
+ mozillaEditor.onReloadWindow();
+ mozillaEditor.setRefreshPage(false);
+ }
+
+ }
+ public void onElementResize(nsIDOMElement element, int constrains, int top, int left, int width, int height) {
+ if (mozillaEditor != null && mozillaEditor.getEditorDomEventListener() != null) {
+ mozillaEditor.getEditorDomEventListener().elementResized(element, constrains, top, left, width, height);
+ }
+ }
+ public void onShowTooltip(int x, int y, String text) {
+ if (mozillaEditor != null && mozillaEditor.getEditorDomEventListener() != null) {
+ mozillaEditor.getEditorDomEventListener().onShowTooltip(x, y, text);
+ }
+ }
+ public void onHideTooltip() {
+ if (mozillaEditor != null && mozillaEditor.getEditorDomEventListener() != null) {
+ mozillaEditor.getEditorDomEventListener().onHideTooltip();
+ }
+ }
+ public void onDispose() {
+ if (mozillaEditor != null) {
+ mozillaEditor.tearDownEditor();
+ mozillaEditor.removeDomEventListeners();
+ mozillaEditor = null;
+ }
+ super.onDispose();
+ }
+}
15 years, 1 month
JBoss Tools SVN: r18816 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-11-25 06:09:30 -0500 (Wed, 25 Nov 2009)
New Revision: 18816
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorSite.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5184, patch from Snjezana Peco has been applied
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -564,6 +564,7 @@
visualEditor.dispose();
}
site.dispose();
+ site = null;
outlinePage = null;
XModelObject o = getModelObject();
if (o != null) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorSite.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorSite.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorSite.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -31,6 +31,7 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.KeyBindingService;
import org.eclipse.ui.internal.PartSite;
import org.eclipse.ui.internal.PopupMenuExtender;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -54,7 +55,7 @@
private ISelectionChangedListener fSelChangeListener = null;
- private IKeyBindingService fParentService = null;
+ //private IKeyBindingService fParentService = null;
private IKeyBindingService fService = null;
@@ -104,14 +105,19 @@
INestableKeyBindingService nestableParent = (INestableKeyBindingService) parentService;
nestableParent.removeKeyBindingService(this);
}
+ if (fService instanceof KeyBindingService) {
+ ((KeyBindingService) fService).dispose();
+ }
fService = null;
}
- //fEditor = null;
- //fEditorPart = null;
if (fSelChangeListener != null) {
getSelectionProvider().removeSelectionChangedListener(fSelChangeListener);
fSelChangeListener = null;
}
+
+ if (serviceLocator != null) {
+ serviceLocator.dispose();
+ }
}
public IEditorActionBarContributor getActionBarContributor() {
@@ -139,7 +145,7 @@
if (fService == null) {
fService = getMultiPageEditor().getEditorSite()
.getKeyBindingService();
- fParentService = fService;
+ //fParentService = fService;
if (fService instanceof INestableKeyBindingService) {
INestableKeyBindingService nestableService = (INestableKeyBindingService) fService;
fService = nestableService.getKeyBindingService(this);
@@ -149,7 +155,7 @@
.log("MultiPageEditorSite.getKeyBindingService() Parent key binding fService was not an instance of INestableKeyBindingService. It was an instance of " + fService.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
}
}
- return fParentService;
+ return fService;
}
public JSPMultiPageEditorPart getMultiPageEditor() {
@@ -272,5 +278,23 @@
return this.serviceLocator.hasService(api);
}
+ /**
+ * Notifies the multi page editor service that the component within which it
+ * exists has become active.
+ *
+ * @since 3.2
+ */
+ public final void activate() {
+ serviceLocator.activate();
+ }
+ /**
+ * Notifies the multi page editor service that the component within which it
+ * exists has been deactived.
+ *
+ * @since 3.2
+ */
+ public final void deactivate() {
+ serviceLocator.deactivate();
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -594,6 +594,7 @@
public void widgetDisposed(DisposeEvent e) {
parent.removeControlListener(controlListener);
parent.removeDisposeListener(this);
+ controlListener = null;
}
});
@@ -876,6 +877,11 @@
/*
* Reinit listeners on the new container.
*/
+ if (controlListener != null) {
+ if (cmpEdTl != null && !cmpEdTl.isDisposed()) {
+ cmpEdTl.getParent().removeControlListener(controlListener);
+ }
+ }
controlListener = new ControlListener() {
public void controlMoved(ControlEvent event) {}
public void controlResized(ControlEvent event) {
@@ -883,6 +889,9 @@
}
};
+ if (cmpEdTl != null && !cmpEdTl.isDisposed()) {
+ cmpEdTl.getParent().addControlListener(controlListener);
+ }
/*
* Layout the parent container for CustomSashForm, Selection Bar.
*/
@@ -944,6 +953,19 @@
@Override
public void dispose() {
+ deactivateServices();
+ sourceActivation = null;
+ sourceMaxmin = null;
+ visualActivation = null;
+ visualMaxmin = null;
+ jumpingActivation = null;
+ jumping = null;
+ if (verticalToolbarEmpty != null) {
+ if (!verticalToolbarEmpty.isDisposed()) {
+ verticalToolbarEmpty.dispose();
+ }
+ verticalToolbarEmpty = null;
+ }
if (optionsObject != null) {
optionsObject.getModel().removeModelTreeListener(listener);
listener=null;
@@ -1023,23 +1045,7 @@
public void partDeactivated(IWorkbenchPart part) {
fActivePart = null;
if (part == multiPageEditor) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (fContextActivation != null) {
- IContextService contextService = (IContextService) workbench
- .getAdapter(IContextService.class);
- contextService.deactivateContext(fContextActivation);
- }
-
- IHandlerService handlerService = (IHandlerService) workbench
- .getService(IHandlerService.class);
- if (handlerService != null) {
- if (sourceActivation != null)
- handlerService.deactivateHandler(sourceActivation);
- if (visualActivation != null)
- handlerService.deactivateHandler(visualActivation);
- if (jumpingActivation != null)
- handlerService.deactivateHandler(jumpingActivation);
- }
+ deactivateServices();
}
}
@@ -1245,5 +1251,25 @@
VpePlugin.getDefault().logError("VPE Selection Bar is not initialized."); //$NON-NLS-1$
}
}
+
+ private void deactivateServices() {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ if (fContextActivation != null) {
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ contextService.deactivateContext(fContextActivation);
+ }
+
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ if (sourceActivation != null)
+ handlerService.deactivateHandler(sourceActivation);
+ if (visualActivation != null)
+ handlerService.deactivateHandler(visualActivation);
+ if (jumpingActivation != null)
+ handlerService.deactivateHandler(jumpingActivation);
+ }
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -34,6 +34,8 @@
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.graphics.Color;
@@ -205,7 +207,7 @@
}
public ToolBar createVisualToolbar(Composite parent) {
- ToolBarManager toolBarManager = new ToolBarManager(SWT.VERTICAL | SWT.FLAT);
+ final ToolBarManager toolBarManager = new ToolBarManager(SWT.VERTICAL | SWT.FLAT);
verBar = toolBarManager.createControl(parent);
/*
@@ -441,6 +443,22 @@
updateToolbarItemsAccordingToPreferences();
toolBarManager.update(true);
+ parent.addDisposeListener(new DisposeListener() {
+
+ public void widgetDisposed(DisposeEvent e) {
+ toolBarManager.dispose();
+ toolBarManager.removeAll();
+ openVPEPreferencesAction = null;
+ visualRefreshAction = null;
+ showResouceDialogAction = null;
+ rotateEditorsAction = null;;
+ showBorderAction = null;
+ showNonVisualTagsAction = null;
+ showSelectionBarAction = null;
+ showTextFormattingAction = null;
+ showBundleAsELAction = null;
+ }
+ });
return verBar;
}
@@ -515,7 +533,7 @@
cmpEd.setBackground(buttonDarker);
try {
- xulRunnerEditor = new XulRunnerEditor(cmpEd) {
+ /*xulRunnerEditor = new XulRunnerEditor(cmpEd) {
public void onLoadWindow() {
// if the first load page
if (!isRefreshPage()) {
@@ -546,10 +564,14 @@
}
}
public void onDispose() {
+ tearDownEditor();
removeDomEventListeners();
+ headNode = null;
+ contentArea = null;
super.onDispose();
}
- };
+ };*/
+ xulRunnerEditor = new XulRunnerEditor2(cmpEd, this);
xulRunnerEditor.getBrowser().addProgressListener(new ProgressListener() {
public void changed(ProgressEvent event) {
@@ -692,6 +714,8 @@
this.controller = null;
formatControllerManager.setVpeController(null);
formatControllerManager=null;
+ headNode = null;
+ contentArea = null;
super.dispose();
}
@@ -702,9 +726,9 @@
public void setEditorDomEventListener(EditorDomEventListener listener) {
editorDomEventListener = listener;
- if (getContentAreaEventListener() != null) {
+ if (contentAreaEventListener != null) {
- getContentAreaEventListener().setEditorDomEventListener(listener);
+ contentAreaEventListener.setEditorDomEventListener(listener);
}
}
@@ -961,7 +985,7 @@
/**
*
*/
- private void onReloadWindow() {
+ public void onReloadWindow() {
removeDomEventListeners();
xulRunnerEditor.removeResizerListener();
contentArea = findContentArea();
@@ -985,7 +1009,7 @@
* Initialized design mode in visual refresh
*/
public void initDesingMode() {
- editor=null;
+ tearDownEditor();
getEditor();
}
@@ -996,7 +1020,7 @@
return doctype;
}
- private boolean isRefreshPage() {
+ public boolean isRefreshPage() {
return isRefreshPage;
}
@@ -1005,9 +1029,21 @@
}
public void reinitDesignMode() {
- editor=null;
+ tearDownEditor();
getEditor();
}
+
+ public void tearDownEditor() {
+ if (editor != null) {
+ nsIEditingSession iEditingSession = (nsIEditingSession) getXulRunnerEditor().
+ getComponentManager().createInstanceByContractID(XPCOM.NS_EDITINGSESSION_CONTRACTID, null, nsIEditingSession.NS_IEDITINGSESSION_IID);
+ nsIDOMWindow window = getXulRunnerEditor().getWebBrowser().getContentDOMWindow();
+ iEditingSession.detachFromWindow(window);
+ iEditingSession.tearDownEditorOnWindow(window);
+ editor = null;
+ }
+ }
+
/**
* Returns Editor for This Document
* @return
@@ -1088,4 +1124,8 @@
public void updateShowSelectionBarItem(boolean checked) {
showSelectionBarAction.setChecked(checked);
}
+
+ public EditorDomEventListener getEditorDomEventListener() {
+ return editorDomEventListener;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -55,7 +55,7 @@
@Override
public void createPartControl(final Composite parent) {
try {
- setXulRunnerEditor(new XulRunnerEditor(parent) {
+ /*setXulRunnerEditor(new XulRunnerEditor(parent) {
public void onLoadWindow() {
super.onLoadWindow();
MozillaPreview.this.onLoadWindow();
@@ -75,7 +75,8 @@
removeDomEventListeners();
super.onDispose();
}
- });
+ });*/
+ setXulRunnerEditor(new XulRunnerPreview(parent, this));
setInitialContent();
getXulRunnerEditor().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
} catch (Throwable e) {
@@ -92,7 +93,7 @@
/**
*
*/
- private void onLoadWindow() {
+ public void onLoadWindow() {
setContentArea(findContentArea());
addDomEventListeners();
if (editorLoadWindowListener != null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -442,7 +442,7 @@
}
protected void onDispose() {
-
+ webBrowser = null;
}
public void setText(String html) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-11-25 08:21:44 UTC (rev 18815)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-11-25 11:09:30 UTC (rev 18816)
@@ -48,6 +48,7 @@
import org.mozilla.interfaces.nsISupports;
import org.mozilla.interfaces.nsITooltipListener;
import org.mozilla.interfaces.nsITransferable;
+import org.mozilla.interfaces.nsIWebProgress;
import org.mozilla.xpcom.Mozilla;
import org.mozilla.xpcom.XPCOMException;
@@ -164,6 +165,10 @@
}
getWebBrowser().removeWebBrowserListener(XulRunnerEditor.this,
nsITooltipListener.NS_ITOOLTIPLISTENER_IID);
+ nsIWebProgress webProgress = (nsIWebProgress) getServiceManager()
+ .getServiceByContractID("@mozilla.org/docloaderservice;1", //$NON-NLS-1$
+ nsIWebProgress.NS_IWEBPROGRESS_IID);
+ webProgress.removeProgressListener(XulRunnerEditor.this);
removeSelectionListener();
if (resizeListener != null)
getIXulRunnerVpeResizer().removeResizeListener(
@@ -188,7 +193,7 @@
paintListener = new VisualPaintListener();
getBrowser().getParent().addPaintListener(paintListener);
// addListener(SWT.Activate, eventListenet);
- addListener(SWT.Paint, eventListenet);
+ // addListener(SWT.Paint, eventListenet);
/*
* https://jira.jboss.org/jira/browse/JBIDE-3917 Resizer and selection
* rectangle should be updated after eclipse window resizing. Need to
@@ -805,6 +810,13 @@
// }
// }
+ @Override
+ protected void onDispose() {
+ lastSelectedNode = null;
+ iFlasher = null;
+ super.onDispose();
+ }
+
private class VisualPaintListener implements PaintListener{
public void paintControl(PaintEvent e) {
@@ -813,4 +825,5 @@
}
+
}
15 years, 1 month
JBoss Tools SVN: r18815 - in trunk: common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-25 03:21:44 -0500 (Wed, 25 Nov 2009)
New Revision: 18815
Added:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/INodeReference.java
Removed:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-24 21:14:41 UTC (rev 18814)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-25 08:21:44 UTC (rev 18815)
@@ -14,6 +14,7 @@
import java.util.Set;
import org.eclipse.jdt.core.IType;
+import org.jboss.tools.common.text.INodeReference;
/**
* @author Alexey Kazakov
@@ -83,7 +84,7 @@
* @return the source reference to <class>...</class> element of
* <alternatives> of beans.xml.
*/
- List<IXmlElementReference> getAlternativeClasses();
+ List<INodeReference> getAlternativeClasses();
/**
* Returns the source reference to <stereotype>...</stereotype> element of
@@ -95,7 +96,7 @@
* @return the source reference to <stereotype>...</stereotype> element of
* <alternatives> of beans.xml.
*/
- List<IXmlElementReference> getAlternativeStereotypes();
+ List<INodeReference> getAlternativeStereotypes();
/**
* Returns the source reference to <stereotype>...</stereotype> or <class>...<class> element of
@@ -108,7 +109,7 @@
* @return the source reference to <stereotype>...</stereotype> or <class>...</class> element of
* <alternatives> of beans.xml by its full qualified type name
*/
- List<IXmlElementReference> getAlternatives(String fullQualifiedTypeName);
+ List<INodeReference> getAlternatives(String fullQualifiedTypeName);
/**
* Returns the source reference to <class>...</class> element of
@@ -120,7 +121,7 @@
* @return the source reference to <class>...</class> element of
* <decorators> of beans.xml.
*/
- List<IXmlElementReference> getDecoratorClasses();
+ List<INodeReference> getDecoratorClasses();
/**
* Returns the source reference to <class>...</class> element of
@@ -132,5 +133,5 @@
* @return the source reference to <class>...</class> element of
* <decorators> of beans.xml by its full qualified type name.
*/
- List<IXmlElementReference> getDecoratorClasses(String fullQualifiedTypeName);
+ List<INodeReference> getDecoratorClasses(String fullQualifiedTypeName);
}
\ No newline at end of file
Deleted: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java 2009-11-24 21:14:41 UTC (rev 18814)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java 2009-11-25 08:21:44 UTC (rev 18815)
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.cdi.core;
-
-import org.jboss.tools.common.text.ITextSourceReference;
-
-/**
- * Represents a reference to XML element. For example there is
- * <class>
- * org.mycompany.Logger
- * </class>
- * then getBody() will return "org.mycompany.Logger"
- * and getStartPosition() will return the offset of the trimmed value (the index of "o")
- * and getLength() will return the length of "org.mycompany.Logger" string.
- *
- * @author Alexey Kazakov
- */
-public interface IXmlElementReference extends ITextSourceReference {
-
- /**
- * Returns the trimmed string representation of the body of this XML
- * element. For example if this object is reference to <class>
- * org.mycompany.Logger </class> then this method will return
- * "org.mycompany.Logger".
- *
- * @return the trimmed string representation of the body of this XML
- * element.
- */
- String getBody();
-}
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/INodeReference.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/INodeReference.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/INodeReference.java 2009-11-25 08:21:44 UTC (rev 18815)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.common.text;
+
+
+/**
+ * Represents a reference to XML node. For example there is
+ * <class>
+ * org.mycompany.Logger
+ * </class>
+ * then getValue() will return "org.mycompany.Logger"
+ * and getStartPosition() will return the offset of the trimmed value (the index of "o")
+ * and getLength() will return the length of "org.mycompany.Logger" string.
+ *
+ * @author Alexey Kazakov
+ */
+public interface INodeReference extends ITextSourceReference {
+
+ /**
+ * Returns the trimmed string representation of the value of the
+ * node. For example if this object is reference to
+ * <class>
+ * org.mycompany.Logger
+ * </class>
+ * then this method will return "org.mycompany.Logger".
+ *
+ * @return the trimmed string representation of the body of this XML
+ * element.
+ */
+ String getValue();
+}
\ No newline at end of file
15 years, 1 month
JBoss Tools SVN: r18814 - in trunk/seam: tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-24 16:14:41 -0500 (Tue, 24 Nov 2009)
New Revision: 18814
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5257
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2009-11-24 20:04:59 UTC (rev 18813)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2009-11-24 21:14:41 UTC (rev 18814)
@@ -76,7 +76,9 @@
.include("mvel.*\\.jar") //$NON-NLS-1$
.include("jboss-el.jar") //$NON-NLS-1$
.include("jxl\\.jar") //$NON-NLS-1$
- .include("itext.*\\.jar"); //$NON-NLS-1$
+ .include("itext.*\\.jar") //$NON-NLS-1$
+ .include("jfreechart.*\\.jar") //$NON-NLS-1$
+ .include("jcommon.*\\.jar"); //$NON-NLS-1$
public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new AntCopyUtils.FileSet()
.include("richfaces-impl\\.jar") //$NON-NLS-1$
@@ -91,6 +93,8 @@
.include("jboss-seam-excel\\.jar") //$NON-NLS-1$
.include("jxl\\.jar") //$NON-NLS-1$
.include("itext.*\\.jar") //$NON-NLS-1$
+ .include("jfreechart.*\\.jar") //$NON-NLS-1$
+ .include("jcommon.*\\.jar") //$NON-NLS-1$
.include("jsf-facelets\\.jar"); //$NON-NLS-1$
public static String DROOLS_LIB_SEAM_RELATED_PATH = "lib"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2009-11-24 20:04:59 UTC (rev 18813)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2009-11-24 21:14:41 UTC (rev 18814)
@@ -87,9 +87,10 @@
.include("stringtemplate.*\\.jar") //$NON-NLS-1$
// el-ri needed for JBIDE-939
.include("el-ri.*\\.jar") //$NON-NLS-1$
- .include("itext.*\\.jar"); //$NON-NLS-1$
+ .include("itext.*\\.jar") //$NON-NLS-1$
+ .include("jfreechart.*\\.jar") //$NON-NLS-1$
+ .include("jcommon.*\\.jar"); //$NON-NLS-1$
-
public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar") //$NON-NLS-1$
@@ -104,9 +105,10 @@
.include("jboss-seam-ui\\.jar") //$NON-NLS-1$
.include("jsf-facelets\\.jar") //$NON-NLS-1$
.include("oscache.*\\.jar") //$NON-NLS-1$
- .include("itext.*\\.jar"); //$NON-NLS-1$
+ .include("itext.*\\.jar") //$NON-NLS-1$
+ .include("jfreechart.*\\.jar") //$NON-NLS-1$
+ .include("jcommon.*\\.jar"); //$NON-NLS-1$
-
private static final String ORG_AJAX4JSF_FILTER_NAME = "ajax4jsf";
private static final String ORG_AJAX4JSF_FILTER_CLASS = "org.ajax4jsf.Filter";
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2009-11-24 20:04:59 UTC (rev 18813)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2009-11-24 21:14:41 UTC (rev 18814)
@@ -43,12 +43,12 @@
protected static final String SEAM_2_0_0 = "Seam 2.0.0";
IFacetedProject warProject;
IFacetedProject earProject;
-
+
private IProjectFacet seam2Facet;
private IProjectFacetVersion seam2FacetVersion;
private boolean suspendAllValidation;
private boolean suspendXJobs;
-
+
public Seam2FacetInstallDelegateTest(String name) {
super(name);
}
@@ -57,45 +57,55 @@
protected void setUp() throws Exception {
suspendAllValidation = ValidationFramework.getDefault().isSuspended();
ValidationFramework.getDefault().suspendAllValidation(true);
-
- ResourcesPlugin.getWorkspace().removeResourceChangeListener( EventManager.getManager() );
-// commented to run tests on wtp 3.0.4 build
-// ws.removeResourceChangeListener( ValManager.getDefault() );
- //EventManager.getManager().shutdown();
-
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(
+ EventManager.getManager());
+ // commented to run tests on wtp 3.0.4 build
+ // ws.removeResourceChangeListener( ValManager.getDefault() );
+ // EventManager.getManager().shutdown();
+
suspendXJobs = XJob.isSuspended();
XJob.setSuspended(true);
assertSeamHomeAvailable();
-
+
seam2Facet = ProjectFacetsManager.getProjectFacet("jst.seam");
seam2FacetVersion = seam2Facet.getVersion("2.0");
-
+
File folder = getSeamHomeFolder();
-
- SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0, folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
+
+ SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0,
+ folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_2_0_0);
- IProject war = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("warprj");
- warProject = (war!=null ? ProjectFacetsManager.create(war, false,
- null): createSeamWarProject("warprj"));
- IProject ear = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("earprj");
- earProject = (ear!=null? ProjectFacetsManager.create(ear, false,
- null):createSeamEarProject("earprj"));
-
- //warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+ IProject war = (IProject) ResourcesPlugin.getWorkspace().getRoot()
+ .findMember("warprj");
+ warProject = (war != null ? ProjectFacetsManager.create(war, false,
+ null) : createSeamWarProject("warprj"));
+ IProject ear = (IProject) ResourcesPlugin.getWorkspace().getRoot()
+ .findMember("earprj");
+ earProject = (ear != null ? ProjectFacetsManager.create(ear, false,
+ null) : createSeamEarProject("earprj"));
+
+ // warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,
+ // null);
}
-
+
@Override
protected void tearDown() throws Exception {
super.tearDown();
- ValidationFramework.getDefault().suspendAllValidation(suspendAllValidation);
+ ValidationFramework.getDefault().suspendAllValidation(
+ suspendAllValidation);
XJob.setSuspended(suspendXJobs);
-
- ResourcesPlugin.getWorkspace().addResourceChangeListener(EventManager.getManager(),
- IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE |
- IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD | IResourceChangeEvent.POST_CHANGE);
-// ws.addResourceChangeListener(ValOperationManager.getDefault(),
-// IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(
+ EventManager.getManager(),
+ IResourceChangeEvent.PRE_CLOSE
+ | IResourceChangeEvent.PRE_DELETE
+ | IResourceChangeEvent.POST_BUILD
+ | IResourceChangeEvent.PRE_BUILD
+ | IResourceChangeEvent.POST_CHANGE);
+ // ws.addResourceChangeListener(ValOperationManager.getDefault(),
+ // IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD);
+
}
public static final String SEAM_201GA_HOME_PROPERY = "jbosstools.test.seam.2.0.1.GA.home";
@@ -103,22 +113,21 @@
protected String getSystemPropertyName() {
return SEAM_201GA_HOME_PROPERY;
}
-
+
@Override
protected IDataModel createSeamDataModel(String deployType) {
-
+
IDataModel dataModel = super.createSeamDataModel(deployType);
- dataModel.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
-
+ dataModel.setStringProperty(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
+
return dataModel;
}
-
-
+
public void testWarLibs() throws CoreException {
-
+
Set<String> seamgenlibs = new HashSet<String>();
-
seamgenlibs.add("antlr-runtime.jar");
seamgenlibs.add("commons-beanutils.jar");
seamgenlibs.add("commons-digester.jar");
@@ -140,52 +149,57 @@
seamgenlibs.add("richfaces-impl.jar");
seamgenlibs.add("richfaces-ui.jar");
seamgenlibs.add("itext.jar");
+ seamgenlibs.add("jfreechart.jar");
+ seamgenlibs.add("jcommon.jar");
- final IContainer warLibs = (IContainer) warProject.getProject().findMember("WebContent/WEB-INF/lib").getAdapter(IContainer.class);
+ final IContainer warLibs = (IContainer) warProject.getProject()
+ .findMember("WebContent/WEB-INF/lib").getAdapter(
+ IContainer.class);
assertOnlyContainsTheseFiles(seamgenlibs, warLibs);
}
public void testMvelWarJars() {
- final IContainer warLibs = (IContainer) warProject.getProject().findMember("WebContent/WEB-INF/lib").getAdapter(IContainer.class);
+ final IContainer warLibs = (IContainer) warProject.getProject()
+ .findMember("WebContent/WEB-INF/lib").getAdapter(
+ IContainer.class);
try {
for (IResource resource : warLibs.members()) {
- if(resource.getName().matches("mvel.*\\.jar") ) {
- return;
- }
+ if (resource.getName().matches("mvel.*\\.jar")) {
+ return;
+ }
}
fail("mvel*.jar weren't found in seam 2.0. WAR project");
} catch (CoreException e) {
fail("Error occured during search mvel libraries in lib folder");
}
-
}
public void testEarLibs() throws CoreException {
-
IProject war = earProject.getProject();
-
- SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earProject.getProject());
-
+
+ SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earProject
+ .getProject());
+
IProject ear = seamProjectsSet.getEarProject();
-
+
Set<String> onlyInWar = new HashSet<String>();
Set<String> onlyInEar = new HashSet<String>();
Set<String> onlyInEarSeam = new HashSet<String>();
- Set<String> onlyInEjbSrc = new HashSet<String>();
+ Set<String> onlyInEjbSrc = new HashSet<String>();
onlyInEarSeam.add("jboss-seam.jar");
onlyInEarSeam.add("lib");
onlyInEarSeam.add("META-INF");
-
+
onlyInEar.add("commons-beanutils.jar");
onlyInEar.add("antlr-runtime.jar");
onlyInEar.add("drools-compiler.jar");
onlyInEar.add("drools-core.jar");
onlyInEar.add("jboss-el.jar");
onlyInEar.add("mvel14.jar");
- onlyInEar.add("richfaces-api.jar");
+ onlyInEar.add("richfaces-api.jar");
onlyInEar.add("jbpm-jpdl.jar");
-
+
onlyInWar.add("commons-digester.jar");
onlyInWar.add("jboss-seam-debug.jar");
onlyInWar.add("jboss-seam-ioc.jar");
@@ -197,50 +211,63 @@
onlyInWar.add("richfaces-impl.jar");
onlyInWar.add("richfaces-ui.jar");
onlyInWar.add("itext.jar");
-
- final IContainer earLibsSeam = (IContainer) ear.findMember(new Path("EarContent")).getAdapter(IContainer.class);
-
+ onlyInWar.add("jfreechart.jar");
+ onlyInWar.add("jcommon.jar");
+
+ final IContainer earLibsSeam = (IContainer) ear.findMember(
+ new Path("EarContent")).getAdapter(IContainer.class);
+
assertOnlyContainsTheseFiles(onlyInEarSeam, earLibsSeam);
-
- final IContainer earLibs = (IContainer) ear.findMember(new Path("EarContent").append("lib")).getAdapter(IContainer.class);
-
+
+ final IContainer earLibs = (IContainer) ear.findMember(
+ new Path("EarContent").append("lib")).getAdapter(
+ IContainer.class);
+
assertOnlyContainsTheseFiles(onlyInEar, earLibs);
-
- final IContainer earMeta = (IContainer) ear.findMember("EarContent/META-INF").getAdapter(IContainer.class);
-
+
+ final IContainer earMeta = (IContainer) ear.findMember(
+ "EarContent/META-INF").getAdapter(IContainer.class);
+
Set onlyInEarMeta = new HashSet();
-
+
onlyInEarMeta.add("jboss-app.xml");
onlyInEarMeta.add("application.xml");
-
+
assertOnlyContainsTheseFiles(onlyInEarMeta, earMeta);
-
- assertOnlyContainsTheseFiles(onlyInWar, (IContainer)war.findMember("WebContent/WEB-INF/lib").getAdapter(IContainer.class));
+ assertOnlyContainsTheseFiles(onlyInWar, (IContainer) war.findMember(
+ "WebContent/WEB-INF/lib").getAdapter(IContainer.class));
+
IProject ejb = seamProjectsSet.getEjbProject();
onlyInEjbSrc.add("security.drl");
onlyInEjbSrc.add("seam.properties");
onlyInEjbSrc.add("import.sql");
onlyInEjbSrc.add("components.properties");
- onlyInEjbSrc.add("META-INF"); // JBIDE-2431: META-INF dir is always created by Seam 2.0 seamgen
- onlyInEjbSrc.add("org"); // JBIDE-2431: org dir is always created by Seam 2.0 seamgen
-
- assertOnlyContainsTheseFiles(onlyInEjbSrc, (IContainer)ejb.findMember("ejbModule").getAdapter(IContainer.class));
+ onlyInEjbSrc.add("META-INF"); // JBIDE-2431: META-INF dir is always
+ // created by Seam 2.0 seamgen
+ onlyInEjbSrc.add("org"); // JBIDE-2431: org dir is always created by
+ // Seam 2.0 seamgen
+
+ assertOnlyContainsTheseFiles(onlyInEjbSrc, (IContainer) ejb.findMember(
+ "ejbModule").getAdapter(IContainer.class));
}
public void testMvelEarJars() {
IProject war = earProject.getProject();
-
- SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earProject.getProject());
-
+
+ SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earProject
+ .getProject());
+
IProject ear = seamProjectsSet.getEarProject();
- final IContainer earLibs = (IContainer) ear.findMember(new Path("EarContent").append("lib")).getAdapter(IContainer.class);
- try {
+ final IContainer earLibs = (IContainer) ear.findMember(
+ new Path("EarContent").append("lib")).getAdapter(
+ IContainer.class);
+ try {
for (IResource resource : earLibs.members()) {
- if(resource.getName().matches("mvel.*\\.jar") ) {
- return;
- }
+ if (resource.getName().matches("mvel.*\\.jar")) {
+ return;
+ }
}
fail("mvel*.jar weren't found in seam 2.0. EAR project");
} catch (CoreException e) {
@@ -249,118 +276,121 @@
}
/**
- * Fails if set of fileNames is not found in dir or some other filename is found in dir.
- * @param fileNames set of strings
- * @param dir directory to scan
- * @throws CoreException
+ * Fails if set of fileNames is not found in dir or some other filename is
+ * found in dir.
+ *
+ * @param fileNames
+ * set of strings
+ * @param dir
+ * directory to scan
+ * @throws CoreException
*/
protected void assertOnlyContainsTheseFiles(Set<String> fileNames,
final IResource dir) throws CoreException {
-
+
final Set<String> foundFiles = new HashSet<String>();
dir.accept(new IResourceProxyVisitor() {
-
+
public boolean visit(IResourceProxy proxy) throws CoreException {
- if(dir.getName().equals(proxy.getName())) return true;
- foundFiles.add(proxy.getName());
+ if (dir.getName().equals(proxy.getName()))
+ return true;
+ foundFiles.add(proxy.getName());
return false;
}
-
+
}, IResource.DEPTH_ZERO);
-
- if(!foundFiles.containsAll(fileNames)) {
+
+ if (!foundFiles.containsAll(fileNames)) {
fileNames.removeAll(foundFiles);
fail("Did not find " + fileNames + " in " + dir);
}
-
+
foundFiles.removeAll(fileNames);
-
- assertTrue("Found additional files (" + foundFiles + " in " + dir + " at " + dir.getLocation(), foundFiles.isEmpty());
+
+ assertTrue("Found additional files (" + foundFiles + " in " + dir
+ + " at " + dir.getLocation(), foundFiles.isEmpty());
}
public void testBootstrapDirPresent() throws CoreException, IOException {
-
SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
-
+
IProject testProject = warPs.getTestProject();
assertTrue(testProject.exists());
-
+
assertNotNull(testProject.findMember("bootstrap"));
- //assertNotNull(testProject.findMember("bootstrap/data"));
-
- assertNull("embedded-ejb should not be installed for seam2", testProject.findMember("embedded-ejb"));
-
+ // assertNotNull(testProject.findMember("bootstrap/data"));
+
+ assertNull("embedded-ejb should not be installed for seam2",
+ testProject.findMember("embedded-ejb"));
}
public void testTestLibs() throws CoreException, IOException {
-
+
SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
-
+
IProject testProject = warPs.getTestProject();
assertTrue(testProject.exists());
-
+
Set<String> libs = new HashSet<String>();
libs.add("testng.jar");
libs.add("hibernate-all.jar");
-// libs.add("jboss-deployers.jar"); // JBIDE-2431: There is no such jar created by Seam 2.0 seamgen
+ // libs.add("jboss-deployers.jar"); // JBIDE-2431: There is no such jar
+ // created by Seam 2.0 seamgen
libs.add("jboss-embedded-all.jar");
libs.add("thirdparty-all.jar");
libs.add("jboss-embedded-api.jar");
- libs.add("core.jar");
-
+ libs.add("core.jar");
+
assertOnlyContainsTheseFiles(libs, testProject.findMember("lib"));
-
- // JBIDE-2431: The following block is commented because it duplicates the call to assertOnlyContainsTheseFiles()
-/*
- assertNotNull(testProject.findMember("lib/testng.jar"));
- assertNotNull(testProject.findMember("lib/hibernate-all.jar"));
-// assertNotNull(testProject.findMember("lib/jboss-deployers.jar")); // JBIDE-2431: There is no such jar created by Seam 2.0 seamgen
- assertNotNull(testProject.findMember("lib/jboss-embedded-all.jar"));
- assertNotNull(testProject.findMember("lib/thirdparty-all.jar"));
- assertNotNull(testProject.findMember("lib/core.jar")); // JBIDE-2431: lib/core.jar file is always created by Seam 2.0 seamgen
-*/
+
+ // JBIDE-2431: The following block is commented because it duplicates
+ // the call to assertOnlyContainsTheseFiles()
+ /*
+ * assertNotNull(testProject.findMember("lib/testng.jar"));
+ * assertNotNull(testProject.findMember("lib/hibernate-all.jar")); //
+ * assertNotNull(testProject.findMember("lib/jboss-deployers.jar")); //
+ * JBIDE-2431: There is no such jar created by Seam 2.0 seamgen
+ * assertNotNull(testProject.findMember("lib/jboss-embedded-all.jar"));
+ * assertNotNull(testProject.findMember("lib/thirdparty-all.jar"));
+ * assertNotNull(testProject.findMember("lib/core.jar")); // JBIDE-2431:
+ * lib/core.jar file is always created by Seam 2.0 seamgen
+ */
}
-
+
public void testSeamProperties() {
- SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
-
+ SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
+
IProject warProject = warPs.getWarProject();
assertTrue(warProject.exists());
-
+
assertNotNull(warProject.findMember("src/main/seam.properties"));
IResource findMember = warProject.findMember("src/hot/seam.properties");
assertNotNull(findMember);
assertTrue(findMember instanceof IFile);
-
}
-
+
public void testJbpmPresent() throws CoreException, IOException {
-
SeamProjectsSet earPs = new SeamProjectsSet(earProject.getProject());
-
+
IProject project = earPs.getEarProject();
assertTrue(project.exists());
-
- assertNotNull(project.findMember("EarContent/lib/jbpm-jpdl.jar"));
-
+
+ assertNotNull(project.findMember("EarContent/lib/jbpm-jpdl.jar"));
}
public void testDroolsPresent() throws CoreException, IOException {
-
-
IProject earRoot = earProject.getProject();
SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earRoot);
-
- // JBIDE-2431: security.drl is always created in <EJBProject>/ejbModule directory by Seam 2.0 seamgen
+
+ // JBIDE-2431: security.drl is always created in <EJBProject>/ejbModule
+ // directory by Seam 2.0 seamgen
IProject ejbProject = seamProjectsSet.getEjbProject();
- assertNotNull(ejbProject.findMember("ejbModule/security.drl"));
-
+ assertNotNull(ejbProject.findMember("ejbModule/security.drl"));
}
-
+
public void testCreateEar() throws CoreException, IOException {
-
}
-
+
@Override
protected IProjectFacetVersion getSeamFacetVersion() {
return seam2FacetVersion;
15 years, 1 month
JBoss Tools SVN: r18813 - in trunk: examples/features/org.jboss.tools.project.examples.feature and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-24 15:04:59 -0500 (Tue, 24 Nov 2009)
New Revision: 18813
Modified:
trunk/esb/features/org.jboss.tools.esb.feature/feature.properties
trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties
trunk/flow/features/org.jboss.tools.flow.common.feature/feature.properties
trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.feature/feature.properties
trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.sdk.feature/feature.properties
trunk/jbpm/features/org.jboss.tools.flow.jpdl4.feature/feature.properties
trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.properties
trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/feature.properties
trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/sourceTemplateFeature/feature.properties
trunk/jbpm/features/org.jbpm.gd.jpdl.feature/feature.properties
trunk/jmx/features/org.jboss.tools.jmx.feature/feature.properties
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties
trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties
trunk/maven/features/org.jboss.tools.maven.sdk.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.seam.feature/feature.properties
trunk/struts/features/org.jboss.tools.struts.feature/feature.properties
trunk/tptp/features/org.jboss.tools.tptp.feature/feature.properties
trunk/ws/features/org.jboss.tools.ws.feature/feature.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5103 License text is incorrect in update manager 'Review Licenses' step during installing selected software
licence text is fixed after verification on last build
Modified: trunk/esb/features/org.jboss.tools.esb.feature/feature.properties
===================================================================
--- trunk/esb/features/org.jboss.tools.esb.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/esb/features/org.jboss.tools.esb.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -27,8 +27,8 @@
description=JBoss ESB Tools
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -38,12 +38,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -45,12 +45,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/flow/features/org.jboss.tools.flow.common.feature/feature.properties
===================================================================
--- trunk/flow/features/org.jboss.tools.flow.common.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/flow/features/org.jboss.tools.flow.common.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -1,13 +1,13 @@
featureName=Flow Languages Common Tools
featureProvider=JBoss by Red Hat
-description=This feature includes common tools for flow languages.
-copyright=Copyright 2009 Red Hat, Inc.
-licenseURL=http://www.eclipse.org/legal/epl-v10.html
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+description=This feature includes common tools for flow languages. \
+copyright=Copyright 2009 Red Hat, Inc. \
+licenseURL=http://www.eclipse.org/legal/epl-v10.html \
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
\ No newline at end of file
Modified: trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.feature/feature.properties
===================================================================
--- trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -29,8 +29,8 @@
description=FreeMarkerIDE provides editor for FreeMarker templates
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -40,12 +40,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.sdk.feature/feature.properties
===================================================================
--- trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.sdk.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/freemarker/features/org.jboss.ide.eclipse.freemarker.sdk.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -15,12 +15,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/jbpm/features/org.jboss.tools.flow.jpdl4.feature/feature.properties
===================================================================
--- trunk/jbpm/features/org.jboss.tools.flow.jpdl4.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jbpm/features/org.jboss.tools.flow.jpdl4.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -3,11 +3,11 @@
description=This feature includes tools for jBPM 4.
copyright=Copyright 2009 Red Hat, Inc.
licenseURL=http://www.eclipse.org/legal/epl-v10.html
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
\ No newline at end of file
Modified: trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.properties
===================================================================
--- trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -3,11 +3,11 @@
description=This feature includes common end-user tools for jBPM 3 and jBPM 4.
copyright=Copyright 2009 Red Hat, Inc.
licenseURL=http://www.eclipse.org/legal/epl-v10.html
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
\ No newline at end of file
Modified: trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/feature.properties
===================================================================
--- trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -27,8 +27,13 @@
description=Conversion of bpmn files to jBPM syntax.
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2009 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
Modified: trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/sourceTemplateFeature/feature.properties
===================================================================
--- trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/sourceTemplateFeature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jbpm/features/org.jboss.tools.jbpm.convert.feature/sourceTemplateFeature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -15,12 +15,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/jbpm/features/org.jbpm.gd.jpdl.feature/feature.properties
===================================================================
--- trunk/jbpm/features/org.jbpm.gd.jpdl.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jbpm/features/org.jbpm.gd.jpdl.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -3,11 +3,11 @@
description=jBPM jPDL Tools
copyright=Copyright 2009 Red Hat, Inc.
licenseURL=http://www.eclipse.org/legal/epl-v10.html
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
\ No newline at end of file
Modified: trunk/jmx/features/org.jboss.tools.jmx.feature/feature.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -15,12 +15,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -15,12 +15,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -15,12 +15,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/maven/features/org.jboss.tools.maven.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/maven/features/org.jboss.tools.maven.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -27,8 +27,12 @@
description=JBoss Maven Integration
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2009 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\n\
+JBoss by Red Hat - Initial implementation.\n
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -38,12 +42,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/maven/features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/maven/features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -14,12 +14,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/maven/features/org.jboss.tools.maven.sdk.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.sdk.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/maven/features/org.jboss.tools.maven.sdk.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -27,8 +27,8 @@
description=JBoss Maven Integration
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -38,12 +38,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/maven/features/org.jboss.tools.maven.seam.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.seam.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/maven/features/org.jboss.tools.maven.seam.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -27,8 +27,12 @@
description=JBoss Maven Seam Integration
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2009 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\n\
+JBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -38,12 +42,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/struts/features/org.jboss.tools.struts.feature/feature.properties
===================================================================
--- trunk/struts/features/org.jboss.tools.struts.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/struts/features/org.jboss.tools.struts.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -44,12 +44,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/tptp/features/org.jboss.tools.tptp.feature/feature.properties
===================================================================
--- trunk/tptp/features/org.jboss.tools.tptp.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/tptp/features/org.jboss.tools.tptp.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -27,8 +27,13 @@
description=TPTP Profile On JBoss Server
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -38,12 +43,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
Modified: trunk/ws/features/org.jboss.tools.ws.feature/feature.properties
===================================================================
--- trunk/ws/features/org.jboss.tools.ws.feature/feature.properties 2009-11-24 18:48:25 UTC (rev 18812)
+++ trunk/ws/features/org.jboss.tools.ws.feature/feature.properties 2009-11-24 20:04:59 UTC (rev 18813)
@@ -28,8 +28,12 @@
description=JBoss WebServices Tools
# "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
-are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.\n
+copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\n\
+JBoss by Red Hat - Initial implementation.
############### end of copyright property ####################################
# "licenseURL" property - URL of the "Feature License"
@@ -39,12 +43,12 @@
# START NON-TRANSLATABLE
# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
-license=Red Hat, Inc. licenses these features and plugins to you under
-certain open source licenses (or aggregations of such licenses), which
-in a particular case may include the Eclipse Public License, the GNU
-Lesser General Public License, and/or certain other open source
-licenses. For precise licensing details, consult the corresponding
-source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
Raleigh NC 27606 USA.
# END NON-TRANSLATABLE
########### end of license property ##########################################
15 years, 1 month
JBoss Tools SVN: r18812 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-24 13:48:25 -0500 (Tue, 24 Nov 2009)
New Revision: 18812
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5221 Replace depricated JBoss Server View with Server View in Seam perspective
Do not forget to reset perspective to test it on old workspace
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java 2009-11-24 18:38:51 UTC (rev 18811)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java 2009-11-24 18:48:25 UTC (rev 18812)
@@ -33,8 +33,7 @@
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addView(IPageLayout.ID_TASK_LIST);
bottom.addView(SEAM_COMPONENTS_NAVIGATOR);
- bottom.addView(JBOSS_SERVERS_VIEW);
- bottom.addPlaceholder(WTP_SERVERS_VIEW);
+ bottom.addView(WTP_SERVERS_VIEW);
IFolderLayout rightTop = layout.createFolder("right", IPageLayout.RIGHT, (float)0.8, editorArea); //$NON-NLS-1$
// rightTop.addView("org.jboss.tools.common.model.ui.views.palette.PaletteView"); //$NON-NLS-1$
15 years, 1 month
JBoss Tools SVN: r18811 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-24 13:38:51 -0500 (Tue, 24 Nov 2009)
New Revision: 18811
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-24 17:48:49 UTC (rev 18810)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-24 18:38:51 UTC (rev 18811)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.util.List;
import java.util.Set;
import org.eclipse.jdt.core.IType;
@@ -57,4 +58,79 @@
* @return the resulting set of beans
*/
Set<IBean> getBeans(IInjectionPoint injectionPoints);
+
+ /**
+ * Returns the all available qualifier types.
+ *
+ * @return the all available qualifier types.
+ */
+ Set<IType> getQualifierTypes();
+
+ /**
+ * Returns the all available stereotypes.
+ *
+ * @return the all available stereotypes.
+ */
+ Set<IType> getStereotypes();
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <alternatives> of beans.xml. For example:
+ * <alternatives>
+ * <class>...</class>
+ * </alternatives>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <alternatives> of beans.xml.
+ */
+ List<IXmlElementReference> getAlternativeClasses();
+
+ /**
+ * Returns the source reference to <stereotype>...</stereotype> element of
+ * <alternatives> of beans.xml. For example:
+ * <alternatives>
+ * <stereotype>...</stereotype>
+ * </alternatives>
+ *
+ * @return the source reference to <stereotype>...</stereotype> element of
+ * <alternatives> of beans.xml.
+ */
+ List<IXmlElementReference> getAlternativeStereotypes();
+
+ /**
+ * Returns the source reference to <stereotype>...</stereotype> or <class>...<class> element of
+ * <alternatives> of beans.xml by its full qualified type name. For example:
+ * <alternatives>
+ * <stereotype>org.compony.Log</stereotype>
+ * <class>org.compony.Item</class>
+ * </alternatives>
+ *
+ * @return the source reference to <stereotype>...</stereotype> or <class>...</class> element of
+ * <alternatives> of beans.xml by its full qualified type name
+ */
+ List<IXmlElementReference> getAlternatives(String fullQualifiedTypeName);
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <decorators> of beans.xml. For example:
+ * <decorators>
+ * <class>...</class>
+ * </decorators>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <decorators> of beans.xml.
+ */
+ List<IXmlElementReference> getDecoratorClasses();
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <decorators> of beans.xml by its full qualified type name. For example:
+ * <decorators>
+ * <class>org.compony.Item</class>
+ * </decorators>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <decorators> of beans.xml by its full qualified type name.
+ */
+ List<IXmlElementReference> getDecoratorClasses(String fullQualifiedTypeName);
}
\ No newline at end of file
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java 2009-11-24 18:38:51 UTC (rev 18811)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.cdi.core;
+
+import java.util.Set;
+
+import org.eclipse.jdt.core.IType;
+
+/**
+ * Represents a decorator.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IDecorator extends IClassBean {
+
+ /**
+ * Returns the @Decorator annotation of this bean class.
+ *
+ * @return
+ */
+ IAnnotationDeclaration getDecoratorAnnotation();
+
+ /**
+ * Obtains the decorated types.
+ *
+ * @return the set of decorated types
+ */
+ Set<IType> getDecoratedTypes();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java 2009-11-24 17:48:49 UTC (rev 18810)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java 2009-11-24 18:38:51 UTC (rev 18811)
@@ -43,4 +43,14 @@
* injection point, and <tt>false</tt> otherwise
*/
boolean isDelegate();
+
+ /**
+ * Returns the @Decorator annotation of this injection point field or
+ * parameter of injection point method. Should not return null if
+ * isDelegate() returns "true".
+ *
+ * @return the @Decorator annotation of this injection point field or
+ * parameter of injection point method. May be null.
+ */
+ IAnnotationDeclaration getDecoratorAnnotation();
}
\ No newline at end of file
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java 2009-11-24 18:38:51 UTC (rev 18811)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.cdi.core;
+
+import org.jboss.tools.common.text.ITextSourceReference;
+
+/**
+ * Represents a reference to XML element. For example there is
+ * <class>
+ * org.mycompany.Logger
+ * </class>
+ * then getBody() will return "org.mycompany.Logger"
+ * and getStartPosition() will return the offset of the trimmed value (the index of "o")
+ * and getLength() will return the length of "org.mycompany.Logger" string.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IXmlElementReference extends ITextSourceReference {
+
+ /**
+ * Returns the trimmed string representation of the body of this XML
+ * element. For example if this object is reference to <class>
+ * org.mycompany.Logger </class> then this method will return
+ * "org.mycompany.Logger".
+ *
+ * @return the trimmed string representation of the body of this XML
+ * element.
+ */
+ String getBody();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month