You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2011/11/17 03:19:27 UTC
svn commit: r1203020 [14/29] - in
/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1: eclipse/
plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/
plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/src/test/resources/application/
plugins/org.apache.geronimo...
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java Thu Nov 17 02:19:12 2011
@@ -1,95 +1,95 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.applicationclient.ApplicationClientType;
-import org.apache.geronimo.j2ee.deployment.EnvironmentType;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
- */
-public class AppClientClientGeneralSection extends CommonGeneralSection {
-
- protected Text callbackHandler;
- protected Text realmName;
- ApplicationClientType plan;
-
- public AppClientClientGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
- super(parent, toolkit, style, plan);
- this.plan = (ApplicationClientType) plan.getValue();
- createClient();
- }
-
- protected void createClient() {
- super.createClient();
- Composite composite = (Composite) getSection().getClient();
-
- createLabel(composite, CommonMessages.editorCallbackHandler);
-
- callbackHandler = toolkit.createText(composite, plan.getCallbackHandler(), SWT.BORDER);
- callbackHandler.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- callbackHandler.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- plan.setCallbackHandler(callbackHandler.getText());
- markDirty();
- }
- });
-
- createLabel(composite, CommonMessages.editorRealmName);
-
- realmName = toolkit.createText(composite, plan.getRealmName(), SWT.BORDER);
- realmName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- realmName.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- plan.setRealmName(realmName.getText());
- markDirty();
- }
- });
- }
-
- protected EnvironmentType getEnvironment(boolean create) {
- EnvironmentType type = null;
- Object plan = getPlan().getValue();
- if (ApplicationClientType.class.isInstance(plan)) {
- type = ((ApplicationClientType) plan).getClientEnvironment();
- if (type == null && create) {
- type = getDeploymentObjectFactory().createEnvironmentType();
- ((ApplicationClientType) plan).setClientEnvironment(type);
- }
- }
-
- return type;
- }
-
- protected String getSectionGeneralTitle() {
- return CommonMessages.editorSectionClientTitle;
- }
-
- protected String getSectionGeneralDescription() {
- return CommonMessages.editorSectionClientDescription;
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.applicationclient.ApplicationClientType;
+import org.apache.geronimo.j2ee.deployment.EnvironmentType;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AppClientClientGeneralSection extends CommonGeneralSection {
+
+ protected Text callbackHandler;
+ protected Text realmName;
+ ApplicationClientType plan;
+
+ public AppClientClientGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (ApplicationClientType) plan.getValue();
+ createClient();
+ }
+
+ protected void createClient() {
+ super.createClient();
+ Composite composite = (Composite) getSection().getClient();
+
+ createLabel(composite, CommonMessages.editorCallbackHandler);
+
+ callbackHandler = toolkit.createText(composite, plan.getCallbackHandler(), SWT.BORDER);
+ callbackHandler.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+ callbackHandler.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ plan.setCallbackHandler(callbackHandler.getText());
+ markDirty();
+ }
+ });
+
+ createLabel(composite, CommonMessages.editorRealmName);
+
+ realmName = toolkit.createText(composite, plan.getRealmName(), SWT.BORDER);
+ realmName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+ realmName.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ plan.setRealmName(realmName.getText());
+ markDirty();
+ }
+ });
+ }
+
+ protected EnvironmentType getEnvironment(boolean create) {
+ EnvironmentType type = null;
+ Object plan = getPlan().getValue();
+ if (ApplicationClientType.class.isInstance(plan)) {
+ type = ((ApplicationClientType) plan).getClientEnvironment();
+ if (type == null && create) {
+ type = getDeploymentObjectFactory().createEnvironmentType();
+ ((ApplicationClientType) plan).setClientEnvironment(type);
+ }
+ }
+
+ return type;
+ }
+
+ protected String getSectionGeneralTitle() {
+ return CommonMessages.editorSectionClientTitle;
+ }
+
+ protected String getSectionGeneralDescription() {
+ return CommonMessages.editorSectionClientDescription;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java Thu Nov 17 02:19:12 2011
@@ -1,61 +1,61 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.applicationclient.ApplicationClientType;
-import org.apache.geronimo.j2ee.deployment.EnvironmentType;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
- */
-public class AppClientServerGeneralSection extends CommonGeneralSection {
-
- ApplicationClientType plan;
-
- public AppClientServerGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
- super(parent, toolkit, style, plan);
- this.plan = (ApplicationClientType) plan.getValue();
- createClient();
- }
-
- protected EnvironmentType getEnvironment(boolean create) {
- EnvironmentType type = null;
- Object plan = getPlan().getValue();
- if (ApplicationClientType.class.isInstance(plan)) {
- type = ((ApplicationClientType) plan).getServerEnvironment();
- if (type == null && create) {
- type = getDeploymentObjectFactory().createEnvironmentType();
- ((ApplicationClientType) plan).setServerEnvironment(type);
- }
- }
-
- return type;
- }
-
- protected String getSectionGeneralTitle() {
- return CommonMessages.editorSectionServerTitle;
- }
-
- protected String getSectionGeneralDescription() {
- return CommonMessages.editorSectionServerDescription;
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.applicationclient.ApplicationClientType;
+import org.apache.geronimo.j2ee.deployment.EnvironmentType;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AppClientServerGeneralSection extends CommonGeneralSection {
+
+ ApplicationClientType plan;
+
+ public AppClientServerGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (ApplicationClientType) plan.getValue();
+ createClient();
+ }
+
+ protected EnvironmentType getEnvironment(boolean create) {
+ EnvironmentType type = null;
+ Object plan = getPlan().getValue();
+ if (ApplicationClientType.class.isInstance(plan)) {
+ type = ((ApplicationClientType) plan).getServerEnvironment();
+ if (type == null && create) {
+ type = getDeploymentObjectFactory().createEnvironmentType();
+ ((ApplicationClientType) plan).setServerEnvironment(type);
+ }
+ }
+
+ return type;
+ }
+
+ protected String getSectionGeneralTitle() {
+ return CommonMessages.editorSectionServerTitle;
+ }
+
+ protected String getSectionGeneralDescription() {
+ return CommonMessages.editorSectionServerDescription;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java Thu Nov 17 02:19:12 2011
@@ -1,163 +1,163 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.deployment.ClassFilterType;
-import org.apache.geronimo.j2ee.deployment.EnvironmentType;
-import org.apache.geronimo.j2ee.jaxbmodel.operations.JAXBObjectFactoryImpl;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.v11.ui.Activator;
-import org.apache.geronimo.st.v11.ui.wizards.ClassFilterWizard;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @version $Rev: 688452 $ $Date: 2008-08-24 13:56:20 +0800 (Sun, 24 Aug 2008) $
- */
-public class ClassFilterSection extends AbstractTableSection {
-
- protected EnvironmentType environment;
-
- protected boolean isServerEnvironment;
-
- // isHiddenClasses = true for hidden classes or false for non overridable classes
- protected boolean isHiddenClasses;
-
- /**
- * @param plan
- * @param parent
- * @param toolkit
- * @param style
- * @param envType
- * @param classFilterType
- */
- public ClassFilterSection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style, boolean isServerEnvironment, boolean isHiddenClasses) {
- super(plan, parent, toolkit, style);
- this.environment = environment;
- this.isServerEnvironment = isServerEnvironment;
- this.isHiddenClasses = isHiddenClasses;
- this.COLUMN_NAMES = new String[] {
- CommonMessages.className
- };
- createClient();
- }
-
- public String getTitle() {
- if (isServerEnvironment && isHiddenClasses)
- return CommonMessages.editorSectionHiddenClassesTitle;
- else if (!isServerEnvironment && isHiddenClasses)
- return CommonMessages.editorSectionClientHiddenClassesTitle;
- else if (isServerEnvironment && !isHiddenClasses)
- return CommonMessages.editorSectionNonOverridableTitle;
- else
- return CommonMessages.editorSectionClientNonOverridableTitle;
- }
-
- public String getDescription() {
- if (isServerEnvironment && isHiddenClasses)
- return CommonMessages.editorSectionHiddenClassesDescription;
- else if (!isServerEnvironment && isHiddenClasses)
- return CommonMessages.editorSectionClientHiddenClassesDescription;
- else if (isServerEnvironment && !isHiddenClasses)
- return CommonMessages.editorSectionNonOverridableDescription;
- else
- return CommonMessages.editorSectionClientNonOverridableDescription;
- }
-
- public List getObjectContainer() {
- if (environment == null) {
- environment = (EnvironmentType)JAXBObjectFactoryImpl.getInstance().create(EnvironmentType.class);
- }
-
- if (getClassFilter() == null) {
- ClassFilterType filter = (ClassFilterType)JAXBObjectFactoryImpl.getInstance().create(ClassFilterType.class);
- setClassFilter (filter);
- }
- return getClassFilter().getFilter();
- }
-
- public Wizard getWizard() {
- return new ClassFilterWizard(this, isServerEnvironment);
- }
-
- public ClassFilterType getClassFilter() {
- if (isHiddenClasses == true)
- return environment.getHiddenClasses();
- else
- return environment.getNonOverridableClasses();
- }
-
- public void setClassFilter (ClassFilterType filter) {
- if (isHiddenClasses == true)
- environment.setHiddenClasses (filter);
- else
- environment.setNonOverridableClasses (filter);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return Activator.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/jar_obj.gif");
- }
-
- public Class getTableEntryObjectType() {
- return String.class;
- }
-
- public Object getInput() {
- if (environment != null) {
- return getClassFilter();
- }
- return super.getInput();
- }
-
- @Override
- public IContentProvider getContentProvider() {
- return new ContentProvider() {
- @Override
- public Object[] getElements(Object inputElement) {
- if (!ClassFilterType.class.isInstance(inputElement)) {
- return new String[] { "" };
- }
- return ((ClassFilterType) inputElement).getFilter().toArray();
- }
- };
- }
-
- @Override
- public ITableLabelProvider getLabelProvider() {
- return new LabelProvider() {
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (String.class.isInstance(element)) {
- switch (columnIndex) {
- case 0:
- return (String) element;
- }
- }
- return null;
- }
- };
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.deployment.ClassFilterType;
+import org.apache.geronimo.j2ee.deployment.EnvironmentType;
+import org.apache.geronimo.j2ee.jaxbmodel.operations.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.ClassFilterWizard;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ClassFilterSection extends AbstractTableSection {
+
+ protected EnvironmentType environment;
+
+ protected boolean isServerEnvironment;
+
+ // isHiddenClasses = true for hidden classes or false for non overridable classes
+ protected boolean isHiddenClasses;
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ * @param envType
+ * @param classFilterType
+ */
+ public ClassFilterSection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style, boolean isServerEnvironment, boolean isHiddenClasses) {
+ super(plan, parent, toolkit, style);
+ this.environment = environment;
+ this.isServerEnvironment = isServerEnvironment;
+ this.isHiddenClasses = isHiddenClasses;
+ this.COLUMN_NAMES = new String[] {
+ CommonMessages.className
+ };
+ createClient();
+ }
+
+ public String getTitle() {
+ if (isServerEnvironment && isHiddenClasses)
+ return CommonMessages.editorSectionHiddenClassesTitle;
+ else if (!isServerEnvironment && isHiddenClasses)
+ return CommonMessages.editorSectionClientHiddenClassesTitle;
+ else if (isServerEnvironment && !isHiddenClasses)
+ return CommonMessages.editorSectionNonOverridableTitle;
+ else
+ return CommonMessages.editorSectionClientNonOverridableTitle;
+ }
+
+ public String getDescription() {
+ if (isServerEnvironment && isHiddenClasses)
+ return CommonMessages.editorSectionHiddenClassesDescription;
+ else if (!isServerEnvironment && isHiddenClasses)
+ return CommonMessages.editorSectionClientHiddenClassesDescription;
+ else if (isServerEnvironment && !isHiddenClasses)
+ return CommonMessages.editorSectionNonOverridableDescription;
+ else
+ return CommonMessages.editorSectionClientNonOverridableDescription;
+ }
+
+ public List getObjectContainer() {
+ if (environment == null) {
+ environment = (EnvironmentType)JAXBObjectFactoryImpl.getInstance().create(EnvironmentType.class);
+ }
+
+ if (getClassFilter() == null) {
+ ClassFilterType filter = (ClassFilterType)JAXBObjectFactoryImpl.getInstance().create(ClassFilterType.class);
+ setClassFilter (filter);
+ }
+ return getClassFilter().getFilter();
+ }
+
+ public Wizard getWizard() {
+ return new ClassFilterWizard(this, isServerEnvironment);
+ }
+
+ public ClassFilterType getClassFilter() {
+ if (isHiddenClasses == true)
+ return environment.getHiddenClasses();
+ else
+ return environment.getNonOverridableClasses();
+ }
+
+ public void setClassFilter (ClassFilterType filter) {
+ if (isHiddenClasses == true)
+ environment.setHiddenClasses (filter);
+ else
+ environment.setNonOverridableClasses (filter);
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/jar_obj.gif");
+ }
+
+ public Class getTableEntryObjectType() {
+ return String.class;
+ }
+
+ public Object getInput() {
+ if (environment != null) {
+ return getClassFilter();
+ }
+ return super.getInput();
+ }
+
+ @Override
+ public IContentProvider getContentProvider() {
+ return new ContentProvider() {
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (!ClassFilterType.class.isInstance(inputElement)) {
+ return new String[] { "" };
+ }
+ return ((ClassFilterType) inputElement).getFilter().toArray();
+ }
+ };
+ }
+
+ @Override
+ public ITableLabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (String.class.isInstance(element)) {
+ switch (columnIndex) {
+ case 0:
+ return (String) element;
+ }
+ }
+ return null;
+ }
+ };
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java Thu Nov 17 02:19:12 2011
@@ -1,175 +1,175 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.openejb_jar.EjbRelationType;
-import org.apache.geronimo.j2ee.openejb_jar.EjbRelationshipRoleType;
-import org.apache.geronimo.j2ee.openejb_jar.RelationshipsType;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.internal.Messages;
-import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
-import org.apache.geronimo.st.v11.ui.Activator;
-import org.apache.geronimo.st.v11.ui.wizards.EjbRelationWizard;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @version $Rev: 705002 $ $Date: 2008-10-16 03:34:27 +0800 (Thu, 16 Oct 2008) $
- */
-public class EjbRelationSection extends AbstractTreeSection {
- public EjbRelationSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, RelationshipsType relationships) {
- super(plan, parent, toolkit, style);
- this.objectContainer = relationships == null ? null : relationships.getEjbRelation();
- createClient();
- }
-
- @Override
- public String getTitle() {
- return CommonMessages.editorEjbRelationTitle;
- }
-
- @Override
- public String getDescription() {
- return CommonMessages.editorEjbRelationDescription;
- }
-
- @Override
- public Wizard getWizard() {
- return new EjbRelationWizard(this);
- }
-
- @Override
- public Class getTableEntryObjectType() {
- return EjbRelationType.class;
- }
-
- @Override
- protected void activateAddButton() {
- if (tree.getSelectionCount() == 0 || tree.getSelection()[0].getParentItem() == null ||
- tree.getSelection()[0].getParentItem().getParentItem() == null) {
- addButton.setEnabled(true);
- } else {
- addButton.setEnabled(false);
- }
- }
-
- public Object getSelectedObject () {
- if (tree.getSelection().length == 0) {
- return null;
- }
- return tree.getSelection()[0].getData();
- }
-
- @Override
- public void removeItem(Object anItem) {
- if (EjbRelationType.class.isInstance(anItem)) {
- getObjectContainer().remove(anItem);
- }
- else if (EjbRelationshipRoleType.class.isInstance(anItem)) {
- EjbRelationType relation = (EjbRelationType)tree.getSelection()[0].getParentItem().getData();
- relation.getEjbRelationshipRole().remove(anItem);
- }
- else if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(anItem)) {
- EjbRelationshipRoleType role = (EjbRelationshipRoleType)tree.getSelection()[0].getParentItem().getData();
- role.getRoleMapping().getCmrFieldMapping().remove(anItem);
- }
- }
-
- @Override
- public Object getInput() {
- if (objectContainer != null) {
- return objectContainer;
- }
- return super.getInput();
- }
-
- public void resetInput (RelationshipsType relationships) {
- objectContainer = relationships.getEjbRelation();
- getViewer().setInput(objectContainer);
- }
-
- @Override
- public ITreeContentProvider getContentProvider() {
- return new ContentProvider() {
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (List.class.isInstance(parentElement)) {
- return ((List)parentElement).toArray();
- }
- if (EjbRelationType.class.isInstance(parentElement)) {
- EjbRelationType relation = (EjbRelationType)parentElement;
- return relation.getEjbRelationshipRole().toArray();
- }
- if (EjbRelationshipRoleType.class.isInstance(parentElement)) {
- EjbRelationshipRoleType role = (EjbRelationshipRoleType)parentElement;
- if (role.getRoleMapping() != null) {
- return role.getRoleMapping().getCmrFieldMapping().toArray();
- }
- }
- return new String[] {};
- }
- };
- }
-
- @Override
- public ILabelProvider getLabelProvider() {
- return new LabelProvider() {
- @Override
- public String getText(Object element) {
- if (EjbRelationType.class.isInstance(element)) {
- EjbRelationType relation = (EjbRelationType)element;
- return Messages.ejbRelalitionName + " \"" + relation.getEjbRelationName() +
- "\", " + Messages.ejbMTMTableName + " \"" + relation.getManyToManyTableName() + "\"";
- }
- if (EjbRelationshipRoleType.class.isInstance(element)) {
- EjbRelationshipRoleType role = (EjbRelationshipRoleType)element;
- return Messages.ejbRelalitionRoleName + " \"" + role.getEjbRelationshipRoleName() +
- "\", " + Messages.ejbSourceName + " = \"" + role.getRelationshipRoleSource().getEjbName() +
- "\", " + Messages.cmrFieldName + " = \"" + role.getCmrField().getCmrFieldName() + "\"";
-
- }
- if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(element)) {
- EjbRelationshipRoleType.RoleMapping.CmrFieldMapping fieldMapping =
- (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping)element;
- return Messages.ejbCmrFiledMapping + ": " + Messages.keyColumn + " = \"" + fieldMapping.getKeyColumn() +
- "\", " + Messages.foreignKeyColumn + " = \"" + fieldMapping.getForeignKeyColumn() + "\"";
- }
-
- return null;
- }
-
- @Override
- public Image getImage(Object arg0) {
- return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee",
- "icons/full/obj16/module_web_obj.gif").createImage();
- }
- };
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.openejb_jar.EjbRelationType;
+import org.apache.geronimo.j2ee.openejb_jar.EjbRelationshipRoleType;
+import org.apache.geronimo.j2ee.openejb_jar.RelationshipsType;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.EjbRelationWizard;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EjbRelationSection extends AbstractTreeSection {
+ public EjbRelationSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, RelationshipsType relationships) {
+ super(plan, parent, toolkit, style);
+ this.objectContainer = relationships == null ? null : relationships.getEjbRelation();
+ createClient();
+ }
+
+ @Override
+ public String getTitle() {
+ return CommonMessages.editorEjbRelationTitle;
+ }
+
+ @Override
+ public String getDescription() {
+ return CommonMessages.editorEjbRelationDescription;
+ }
+
+ @Override
+ public Wizard getWizard() {
+ return new EjbRelationWizard(this);
+ }
+
+ @Override
+ public Class getTableEntryObjectType() {
+ return EjbRelationType.class;
+ }
+
+ @Override
+ protected void activateAddButton() {
+ if (tree.getSelectionCount() == 0 || tree.getSelection()[0].getParentItem() == null ||
+ tree.getSelection()[0].getParentItem().getParentItem() == null) {
+ addButton.setEnabled(true);
+ } else {
+ addButton.setEnabled(false);
+ }
+ }
+
+ public Object getSelectedObject () {
+ if (tree.getSelection().length == 0) {
+ return null;
+ }
+ return tree.getSelection()[0].getData();
+ }
+
+ @Override
+ public void removeItem(Object anItem) {
+ if (EjbRelationType.class.isInstance(anItem)) {
+ getObjectContainer().remove(anItem);
+ }
+ else if (EjbRelationshipRoleType.class.isInstance(anItem)) {
+ EjbRelationType relation = (EjbRelationType)tree.getSelection()[0].getParentItem().getData();
+ relation.getEjbRelationshipRole().remove(anItem);
+ }
+ else if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(anItem)) {
+ EjbRelationshipRoleType role = (EjbRelationshipRoleType)tree.getSelection()[0].getParentItem().getData();
+ role.getRoleMapping().getCmrFieldMapping().remove(anItem);
+ }
+ }
+
+ @Override
+ public Object getInput() {
+ if (objectContainer != null) {
+ return objectContainer;
+ }
+ return super.getInput();
+ }
+
+ public void resetInput (RelationshipsType relationships) {
+ objectContainer = relationships.getEjbRelation();
+ getViewer().setInput(objectContainer);
+ }
+
+ @Override
+ public ITreeContentProvider getContentProvider() {
+ return new ContentProvider() {
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (List.class.isInstance(parentElement)) {
+ return ((List)parentElement).toArray();
+ }
+ if (EjbRelationType.class.isInstance(parentElement)) {
+ EjbRelationType relation = (EjbRelationType)parentElement;
+ return relation.getEjbRelationshipRole().toArray();
+ }
+ if (EjbRelationshipRoleType.class.isInstance(parentElement)) {
+ EjbRelationshipRoleType role = (EjbRelationshipRoleType)parentElement;
+ if (role.getRoleMapping() != null) {
+ return role.getRoleMapping().getCmrFieldMapping().toArray();
+ }
+ }
+ return new String[] {};
+ }
+ };
+ }
+
+ @Override
+ public ILabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ if (EjbRelationType.class.isInstance(element)) {
+ EjbRelationType relation = (EjbRelationType)element;
+ return Messages.ejbRelalitionName + " \"" + relation.getEjbRelationName() +
+ "\", " + Messages.ejbMTMTableName + " \"" + relation.getManyToManyTableName() + "\"";
+ }
+ if (EjbRelationshipRoleType.class.isInstance(element)) {
+ EjbRelationshipRoleType role = (EjbRelationshipRoleType)element;
+ return Messages.ejbRelalitionRoleName + " \"" + role.getEjbRelationshipRoleName() +
+ "\", " + Messages.ejbSourceName + " = \"" + role.getRelationshipRoleSource().getEjbName() +
+ "\", " + Messages.cmrFieldName + " = \"" + role.getCmrField().getCmrFieldName() + "\"";
+
+ }
+ if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(element)) {
+ EjbRelationshipRoleType.RoleMapping.CmrFieldMapping fieldMapping =
+ (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping)element;
+ return Messages.ejbCmrFiledMapping + ": " + Messages.keyColumn + " = \"" + fieldMapping.getKeyColumn() +
+ "\", " + Messages.foreignKeyColumn + " = \"" + fieldMapping.getForeignKeyColumn() + "\"";
+ }
+
+ return null;
+ }
+
+ @Override
+ public Image getImage(Object arg0) {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee",
+ "icons/full/obj16/module_web_obj.gif").createImage();
+ }
+ };
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java Thu Nov 17 02:19:12 2011
@@ -1,136 +1,136 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.application.ExtModuleType;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.internal.Messages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.v11.ui.wizards.ExtModuleWizard;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/*
- * @version $Rev: 690385 $ $Date: 2008-08-30 04:43:47 +0800 (Sat, 30 Aug 2008) $
- */
-public class ExtModuleSection extends AbstractTableSection {
-
- public ExtModuleSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List extModules) {
- super(plan, parent, toolkit, style);
- this.objectContainer = extModules;
- COLUMN_NAMES = new String[] {
- CommonMessages.moduleType, CommonMessages.path, CommonMessages.internalPath,
- CommonMessages.groupId, CommonMessages.artifactId, CommonMessages.version, CommonMessages.artifactType };
- createClient();
- }
-
- public String getTitle() {
- return CommonMessages.editorSectionExtModuleTitle;
- }
-
- public String getDescription() {
- return CommonMessages.editorSectionExtModuleDescription;
- }
-
- public Wizard getWizard() {
- return new ExtModuleWizard(this);
- }
-
- public Class getTableEntryObjectType() {
- return ExtModuleType.class;
- }
-
- @Override
- public ITableLabelProvider getLabelProvider() {
- return new LabelProvider() {
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (ExtModuleType.class.isInstance(element)) {
- ExtModuleType extModule = (ExtModuleType) element;
- switch (columnIndex) {
- case 0:
- if (extModule.getConnector() != null) {
- return Messages.connector;
- } else if (extModule.getEjb() != null) {
- return Messages.ejb;
- } else if (extModule.getJava() != null) {
- return Messages.java;
- } else if (extModule.getWeb() != null) {
- return Messages.web;
- }
- return "";
- case 1:
- if (extModule.getConnector() != null) {
- return extModule.getConnector().getValue();
- } else if (extModule.getEjb() != null) {
- return extModule.getEjb().getValue();
- } else if (extModule.getJava() != null) {
- return extModule.getJava().getValue();
- } else if (extModule.getWeb() != null) {
- return extModule.getWeb().getValue();
- }
- return "";
- case 2:
- if (extModule.getInternalPath() != null) {
- return extModule.getInternalPath();
- }
- return "";
- case 3:
- if (extModule.getExternalPath() != null) {
- String externalPath = extModule.getExternalPath();
- //suppose external path is in format of "groupId/artifactId/version/type"
- String[] segments = externalPath.split("/");
- return segments[0];
- }
- return "";
- case 4:
- if (extModule.getExternalPath() != null) {
- String externalPath = extModule.getExternalPath();
- //suppose external path is in format of "groupId/artifactId/version/type"
- String[] segments = externalPath.split("/");
- return segments[1];
- }
- return "";
- case 5:
- if (extModule.getExternalPath() != null) {
- String externalPath = extModule.getExternalPath();
- //suppose external path is in format of "groupId/artifactId/version/type"
- String[] segments = externalPath.split("/");
- return segments[2];
- }
- return "";
- case 6:
- if (extModule.getExternalPath() != null) {
- String externalPath = extModule.getExternalPath();
- //suppose external path is in format of "groupId/artifactId/version/type"
- String[] segments = externalPath.split("/");
- return segments[3];
- }
- return "";
- }
- }
- return null;
- }
- };
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.application.ExtModuleType;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.wizards.ExtModuleWizard;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/*
+ * @version $Rev$ $Date$
+ */
+public class ExtModuleSection extends AbstractTableSection {
+
+ public ExtModuleSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List extModules) {
+ super(plan, parent, toolkit, style);
+ this.objectContainer = extModules;
+ COLUMN_NAMES = new String[] {
+ CommonMessages.moduleType, CommonMessages.path, CommonMessages.internalPath,
+ CommonMessages.groupId, CommonMessages.artifactId, CommonMessages.version, CommonMessages.artifactType };
+ createClient();
+ }
+
+ public String getTitle() {
+ return CommonMessages.editorSectionExtModuleTitle;
+ }
+
+ public String getDescription() {
+ return CommonMessages.editorSectionExtModuleDescription;
+ }
+
+ public Wizard getWizard() {
+ return new ExtModuleWizard(this);
+ }
+
+ public Class getTableEntryObjectType() {
+ return ExtModuleType.class;
+ }
+
+ @Override
+ public ITableLabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (ExtModuleType.class.isInstance(element)) {
+ ExtModuleType extModule = (ExtModuleType) element;
+ switch (columnIndex) {
+ case 0:
+ if (extModule.getConnector() != null) {
+ return Messages.connector;
+ } else if (extModule.getEjb() != null) {
+ return Messages.ejb;
+ } else if (extModule.getJava() != null) {
+ return Messages.java;
+ } else if (extModule.getWeb() != null) {
+ return Messages.web;
+ }
+ return "";
+ case 1:
+ if (extModule.getConnector() != null) {
+ return extModule.getConnector().getValue();
+ } else if (extModule.getEjb() != null) {
+ return extModule.getEjb().getValue();
+ } else if (extModule.getJava() != null) {
+ return extModule.getJava().getValue();
+ } else if (extModule.getWeb() != null) {
+ return extModule.getWeb().getValue();
+ }
+ return "";
+ case 2:
+ if (extModule.getInternalPath() != null) {
+ return extModule.getInternalPath();
+ }
+ return "";
+ case 3:
+ if (extModule.getExternalPath() != null) {
+ String externalPath = extModule.getExternalPath();
+ //suppose external path is in format of "groupId/artifactId/version/type"
+ String[] segments = externalPath.split("/");
+ return segments[0];
+ }
+ return "";
+ case 4:
+ if (extModule.getExternalPath() != null) {
+ String externalPath = extModule.getExternalPath();
+ //suppose external path is in format of "groupId/artifactId/version/type"
+ String[] segments = externalPath.split("/");
+ return segments[1];
+ }
+ return "";
+ case 5:
+ if (extModule.getExternalPath() != null) {
+ String externalPath = extModule.getExternalPath();
+ //suppose external path is in format of "groupId/artifactId/version/type"
+ String[] segments = externalPath.split("/");
+ return segments[2];
+ }
+ return "";
+ case 6:
+ if (extModule.getExternalPath() != null) {
+ String externalPath = extModule.getExternalPath();
+ //suppose external path is in format of "groupId/artifactId/version/type"
+ String[] segments = externalPath.split("/");
+ return segments[3];
+ }
+ return "";
+ }
+ }
+ return null;
+ }
+ };
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ExtModuleSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java Thu Nov 17 02:19:12 2011
@@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Composite
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
- * @version $Rev: 688452 $ $Date: 2008-08-24 01:56:20 -0400 (Sun, 24 Aug 2008) $
+ * @version $Rev$ $Date$
*/
public class GBeanSection extends AbstractTreeSection {
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java Thu Nov 17 02:19:12 2011
@@ -1,93 +1,93 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.naming.MessageDestinationType;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.v11.ui.wizards.MessageDestWizard;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @version $Rev: 688452 $ $Date: 2008-08-24 13:56:20 +0800 (Sun, 24 Aug 2008) $
- */
-public class MessageDestSection extends AbstractTableSection {
-
- public MessageDestSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List messageDest) {
- super(plan, parent, toolkit, style);
- this.objectContainer = messageDest;
- COLUMN_NAMES = new String[] {
- CommonMessages.messageDestinationName, CommonMessages.adminModule, CommonMessages.adminLink,
- CommonMessages.groupId, CommonMessages.artifactId, CommonMessages.version,
- CommonMessages.moduleId, CommonMessages.name };
- createClient();
- }
-
- public String getTitle() {
- return CommonMessages.editorSectionMessageDestTitle;
- }
-
- public String getDescription() {
- return CommonMessages.editorSectionMessageDestDescription;
- }
-
- public Wizard getWizard() {
- return new MessageDestWizard(this);
- }
-
- public Class getTableEntryObjectType() {
- return MessageDestinationType.class;
- }
-
- @Override
- public ITableLabelProvider getLabelProvider() {
- return new LabelProvider() {
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (MessageDestinationType.class.isInstance(element)) {
- MessageDestinationType msgDest = (MessageDestinationType) element;
- switch (columnIndex) {
- case 0:
- return msgDest.getMessageDestinationName();
- case 1:
- return msgDest.getAdminObjectModule();
- case 2:
- return msgDest.getAdminObjectLink();
- case 3:
- return msgDest.getPattern().getGroupId();
- case 4:
- return msgDest.getPattern().getArtifactId();
- case 5:
- return msgDest.getPattern().getVersion();
- case 6:
- return msgDest.getPattern().getModule();
- case 7:
- return msgDest.getPattern().getName();
- }
- }
- return null;
- }
- };
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.naming.MessageDestinationType;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.wizards.MessageDestWizard;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class MessageDestSection extends AbstractTableSection {
+
+ public MessageDestSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List messageDest) {
+ super(plan, parent, toolkit, style);
+ this.objectContainer = messageDest;
+ COLUMN_NAMES = new String[] {
+ CommonMessages.messageDestinationName, CommonMessages.adminModule, CommonMessages.adminLink,
+ CommonMessages.groupId, CommonMessages.artifactId, CommonMessages.version,
+ CommonMessages.moduleId, CommonMessages.name };
+ createClient();
+ }
+
+ public String getTitle() {
+ return CommonMessages.editorSectionMessageDestTitle;
+ }
+
+ public String getDescription() {
+ return CommonMessages.editorSectionMessageDestDescription;
+ }
+
+ public Wizard getWizard() {
+ return new MessageDestWizard(this);
+ }
+
+ public Class getTableEntryObjectType() {
+ return MessageDestinationType.class;
+ }
+
+ @Override
+ public ITableLabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (MessageDestinationType.class.isInstance(element)) {
+ MessageDestinationType msgDest = (MessageDestinationType) element;
+ switch (columnIndex) {
+ case 0:
+ return msgDest.getMessageDestinationName();
+ case 1:
+ return msgDest.getAdminObjectModule();
+ case 2:
+ return msgDest.getAdminObjectLink();
+ case 3:
+ return msgDest.getPattern().getGroupId();
+ case 4:
+ return msgDest.getPattern().getArtifactId();
+ case 5:
+ return msgDest.getPattern().getVersion();
+ case 6:
+ return msgDest.getPattern().getModule();
+ case 7:
+ return msgDest.getPattern().getName();
+ }
+ }
+ return null;
+ }
+ };
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/MessageDestSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java?rev=1203020&r1=1203019&r2=1203020&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java Thu Nov 17 02:19:12 2011
@@ -1,103 +1,103 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v11.ui.sections;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.j2ee.application.ModuleType;
-import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.internal.Messages;
-import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.v11.ui.wizards.ModuleWizard;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/*
- * @version $Rev: 688452 $ $Date: 2008-08-24 13:56:20 +0800 (Sun, 24 Aug 2008) $
- */
-public class ModuleSection extends AbstractTableSection {
-
- public ModuleSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List modules) {
- super(plan, parent, toolkit, style);
- this.objectContainer = modules;
- COLUMN_NAMES = new String[] {
- CommonMessages.moduleType, CommonMessages.path, CommonMessages.altDD };
- createClient();
- }
-
- public String getTitle() {
- return CommonMessages.editorSectionModuleTitle;
- }
-
- public String getDescription() {
- return CommonMessages.editorSectionModuleDescription;
- }
-
- public Wizard getWizard() {
- return new ModuleWizard(this);
- }
-
- public Class getTableEntryObjectType() {
- return ModuleType.class;
- }
-
- @Override
- public ITableLabelProvider getLabelProvider() {
- return new LabelProvider() {
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (ModuleType.class.isInstance(element)) {
- ModuleType module = (ModuleType) element;
- switch (columnIndex) {
- case 0:
- if (module.getConnector() != null) {
- return Messages.connector;
- } else if (module.getEjb() != null) {
- return Messages.ejb;
- } else if (module.getJava() != null) {
- return Messages.java;
- } else if (module.getWeb() != null) {
- return Messages.web;
- }
- return "";
- case 1:
- if (module.getConnector() != null) {
- return module.getConnector().getValue();
- } else if (module.getEjb() != null) {
- return module.getEjb().getValue();
- } else if (module.getJava() != null) {
- return module.getJava().getValue();
- } else if (module.getWeb() != null) {
- return module.getWeb().getValue();
- }
- return "";
- case 2:
- if (module.getAltDd() != null) {
- return module.getAltDd().getValue();
- }
- return "";
- }
- }
- return null;
- }
- };
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.j2ee.application.ModuleType;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.wizards.ModuleWizard;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/*
+ * @version $Rev$ $Date$
+ */
+public class ModuleSection extends AbstractTableSection {
+
+ public ModuleSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List modules) {
+ super(plan, parent, toolkit, style);
+ this.objectContainer = modules;
+ COLUMN_NAMES = new String[] {
+ CommonMessages.moduleType, CommonMessages.path, CommonMessages.altDD };
+ createClient();
+ }
+
+ public String getTitle() {
+ return CommonMessages.editorSectionModuleTitle;
+ }
+
+ public String getDescription() {
+ return CommonMessages.editorSectionModuleDescription;
+ }
+
+ public Wizard getWizard() {
+ return new ModuleWizard(this);
+ }
+
+ public Class getTableEntryObjectType() {
+ return ModuleType.class;
+ }
+
+ @Override
+ public ITableLabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (ModuleType.class.isInstance(element)) {
+ ModuleType module = (ModuleType) element;
+ switch (columnIndex) {
+ case 0:
+ if (module.getConnector() != null) {
+ return Messages.connector;
+ } else if (module.getEjb() != null) {
+ return Messages.ejb;
+ } else if (module.getJava() != null) {
+ return Messages.java;
+ } else if (module.getWeb() != null) {
+ return Messages.web;
+ }
+ return "";
+ case 1:
+ if (module.getConnector() != null) {
+ return module.getConnector().getValue();
+ } else if (module.getEjb() != null) {
+ return module.getEjb().getValue();
+ } else if (module.getJava() != null) {
+ return module.getJava().getValue();
+ } else if (module.getWeb() != null) {
+ return module.getWeb().getValue();
+ }
+ return "";
+ case 2:
+ if (module.getAltDd() != null) {
+ return module.getAltDd().getValue();
+ }
+ return "";
+ }
+ }
+ return null;
+ }
+ };
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/3.0-beta-1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ModuleSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain