You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2005/10/03 16:21:36 UTC
svn commit: r293358 - in
/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui:
editors/ pages/ sections/
Author: sppatel
Date: Mon Oct 3 07:21:32 2005
New Revision: 293358
URL: http://svn.apache.org/viewcvs?rev=293358&view=rev
Log:
- add classes specfied in extension point updates
- dynamictablesection extends AbstractSectionPart
Added:
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/ConnectorOverviewPage.java
Modified:
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/EjbOverviewPage.java
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java?rev=293358&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java Mon Oct 3 07:21:32 2005
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed 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.ui.editors;
+
+import org.apache.geronimo.core.internal.GeronimoUtils;
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.pages.ConnectorOverviewPage;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.ui.PartInitException;
+
+public class ConnectorPlanEditor extends AbstractGeronimoDeploymentPlanEditor {
+
+ public ConnectorPlanEditor() {
+ super();
+ }
+
+ public void doAddPages() throws PartInitException {
+ addPage(new ConnectorOverviewPage(this, "connectoroverview",
+ Messages.editorTabGeneral));
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.editors.AbstractGeronimoDeploymentPlanEditor#loadDeploymentPlan(org.eclipse.core.resources.IFile)
+ */
+ public EObject loadDeploymentPlan(IFile file) {
+ return GeronimoUtils.getConnectorDeploymentPlan(file);
+ }
+
+}
Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/ConnectorOverviewPage.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/ConnectorOverviewPage.java?rev=293358&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/ConnectorOverviewPage.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/ConnectorOverviewPage.java Mon Oct 3 07:21:32 2005
@@ -0,0 +1,71 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed 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.ui.pages;
+
+import org.apache.geronimo.ui.editors.ConnectorPlanEditor;
+import org.apache.geronimo.ui.sections.ConnectorGeneralSection;
+import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorType;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class ConnectorOverviewPage extends FormPage {
+
+ /**
+ * @param editor
+ * @param id
+ * @param title
+ */
+ public ConnectorOverviewPage(FormEditor editor, String id, String title) {
+ super(editor, id, title);
+ }
+
+ /**
+ * @param id
+ * @param title
+ */
+ public ConnectorOverviewPage(String id, String title) {
+ super(id, title);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent(IManagedForm managedForm) {
+
+ ConnectorType plan = (ConnectorType) ((ConnectorPlanEditor) getEditor())
+ .getDeploymentPlan();
+
+ ScrolledForm form = managedForm.getForm();
+ form.setText(getTitle());
+ form.getBody().setLayout(new GridLayout());
+
+ ConnectorGeneralSection sec = new ConnectorGeneralSection(form
+ .getBody(), managedForm.getToolkit(),
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE, plan);
+ managedForm.addPart(sec);
+
+ form.reflow(true);
+ }
+
+
+}
Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/EjbOverviewPage.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/EjbOverviewPage.java?rev=293358&r1=293357&r2=293358&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/EjbOverviewPage.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/EjbOverviewPage.java Mon Oct 3 07:21:32 2005
@@ -15,13 +15,17 @@
*/
package org.apache.geronimo.ui.pages;
+import org.apache.geronimo.ui.editors.OpenEjbPlanEditor;
+import org.apache.geronimo.ui.sections.OpenEjbJarGeneralSection;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
-/**
- *
- *
- */
public class EjbOverviewPage extends FormPage {
/**
@@ -31,7 +35,6 @@
*/
public EjbOverviewPage(FormEditor editor, String id, String title) {
super(editor, id, title);
- // TODO Auto-generated constructor stub
}
/**
@@ -40,7 +43,30 @@
*/
public EjbOverviewPage(String id, String title) {
super(id, title);
- // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent(IManagedForm managedForm) {
+
+ OpenejbJarType plan = (OpenejbJarType) ((OpenEjbPlanEditor) getEditor())
+ .getDeploymentPlan();
+
+ ScrolledForm form = managedForm.getForm();
+ form.setText(getTitle());
+ form.getBody().setLayout(new GridLayout());
+
+ OpenEjbJarGeneralSection sec = new OpenEjbJarGeneralSection(form
+ .getBody(), managedForm.getToolkit(),
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE, plan);
+ managedForm.addPart(sec);
+
+ form.reflow(true);
}
}
Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java?rev=293358&r1=293357&r2=293358&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java Mon Oct 3 07:21:32 2005
@@ -46,11 +46,10 @@
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
-public abstract class DynamicTableSection extends SectionPart {
+public abstract class DynamicTableSection extends AbstractSectionPart {
private EObject plan;
@@ -66,22 +65,6 @@
public DynamicTableSection(Section section) {
super(section);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.forms.IFormPart#commit(boolean)
- *
- * Overriding this method as a workaround as switching tabs on a dirty
- * editor commits the page and marks the part as not dirty.
- */
- public void commit(boolean onSave) {
- boolean currentDirtyState = isDirty();
- super.commit(onSave);
- if (!onSave && currentDirtyState) {
- markDirty();
- }
}
public DynamicTableSection(EObject plan, Composite parent,