Author: scabanovich
Date: 2008-02-18 06:03:44 -0500 (Mon, 18 Feb 2008)
New Revision: 6372
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/.classpath
trunk/esb/plugins/org.jboss.tools.esb.ui/.cvsignore
trunk/esb/plugins/org.jboss.tools.esb.ui/.options.template
trunk/esb/plugins/org.jboss.tools.esb.ui/.project
trunk/esb/plugins/org.jboss.tools.esb.ui/META-INF/
trunk/esb/plugins/org.jboss.tools.esb.ui/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.ui/about.html
trunk/esb/plugins/org.jboss.tools.esb.ui/build.properties
trunk/esb/plugins/org.jboss.tools.esb.ui/images/
trunk/esb/plugins/org.jboss.tools.esb.ui/images/esb16.png
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/editors/
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/editors/esb.gif
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/wizards/
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/wizards/esb.gif
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.properties
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/ui/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/ui/wizard/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/ui/wizard/newfile/
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/ui/wizard/newfile/ESB_File_wiz.png
trunk/esb/plugins/org.jboss.tools.esb.ui/src/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUiPlugin.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBListsFormLayoutData.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBXMLFormLayoutData.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/newfile/
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/newfile/NewESBFileWizard.java
Log:
JBIDE-1670
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/.classpath
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/.classpath (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/.classpath 2008-02-18 11:03:44 UTC (rev
6372)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="resources/"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/.cvsignore
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/.cvsignore (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/.cvsignore 2008-02-18 11:03:44 UTC (rev
6372)
@@ -0,0 +1,2 @@
+bin
+yguard.log
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/.options.template
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/.options.template
(rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/.options.template 2008-02-18 11:03:44 UTC
(rev 6372)
@@ -0,0 +1 @@
+org.jboss.tools.jsf.ui/debug=false
\ No newline at end of file
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/.project
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/.project (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/.project 2008-02-18 11:03:44 UTC (rev 6372)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.esb.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>
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/META-INF/MANIFEST.MF 2008-02-18 11:03:44 UTC
(rev 6372)
@@ -0,0 +1,37 @@
+Manifest-Version: 1.0
+Eclipse-LazyStart: true
+Bundle-Name: %pluginName
+Bundle-ClassPath: esb-ui.jar
+Bundle-Activator: org.jboss.tools.esb.ui.ESBUiPlugin
+Bundle-Vendor: %providerName
+Provide-Package: org.jboss.tools.esb.ui,
+ org.jboss.tools.esb.ui.editor.form,
+ org.jboss.tools.esb.ui.wizard.newfile
+Bundle-SymbolicName: org.jboss.tools.esb.ui; singleton:=true
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.jface.text,
+ org.eclipse.jdt.ui,
+ org.eclipse.wst.sse.ui,
+ org.eclipse.wst.xml.core,
+ org.eclipse.wst.xml.ui,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.wst.common.ui,
+ org.eclipse.compare,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.jface,
+ org.eclipse.ui,
+ org.eclipse.draw2d,
+ org.eclipse.gef,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.core.expressions,
+ org.eclipse.ui.views,
+ org.jboss.tools.common.model,
+ org.jboss.tools.common.model.ui,
+ org.jboss.tools.common.text.xml,
+ org.jboss.tools.jst.web,
+ org.jboss.tools.jst.web.ui,
+ org.jboss.tools.esb.core
+Bundle-Version: 2.0.0
+
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/about.html
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/about.html (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/about.html 2008-02-18 11:03:44 UTC (rev
6372)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this
plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A
href="http://www.eclipse.org/org/documents/epl-v10.php">http...;.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A
href="http://www.jboss.org/tools">http://www.jboss.org/tools...
+
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/build.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/build.properties (rev
0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/build.properties 2008-02-18 11:03:44 UTC (rev
6372)
@@ -0,0 +1,17 @@
+bin.includes = plugin.xml,\
+ *.jar,\
+ plugin.properties,\
+ images/,\
+ META-INF/,\
+ about.html
+source.esb-ui.jar = src/,\
+ resources/
+jars.compile.order = esb-ui.jar
+src.includes = resources/,\
+ src/,\
+ plugin.xml,\
+ plugin.properties,\
+ images/,\
+ build.properties,\
+ about.html,\
+ META-INF/
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/images/esb16.png
===================================================================
(Binary files differ)
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui/images/esb16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/editors/esb.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/editors/esb.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/wizards/esb.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/esb/plugins/org.jboss.tools.esb.ui/images/xstudio/wizards/esb.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.properties
(rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.properties 2008-02-18 11:03:44 UTC
(rev 6372)
@@ -0,0 +1,2 @@
+providerName=Red Hat, Inc.
+pluginName=ESB XML
\ No newline at end of file
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2008-02-18 11:03:44 UTC (rev
6372)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <wizard
+ category="org.jboss.tools.seam.ui"
+ class="org.jboss.tools.esb.ui.wizard.newfile.NewESBFileWizard"
+ icon="images/esb16.png"
+ id="org.jboss.tools.esb.ui.wizard.newfile.NewESBFileWizard"
+ name="ESB File"
+ project="false">
+ <selection class="org.eclipse.core.resources.IResource">
+ </selection>
+ <description>
+ Create a ESB XML File
+ </description>
+ </wizard>
+ </extension>
+
+ <extension id="e" name="XML Editors"
point="org.jboss.tools.common.model.ui.xmlEditor">
+ <xmlEditor
+ class="org.jboss.tools.jst.web.ui.editors.WebCompoundEditor"
+
contributorClass="org.jboss.tools.common.model.ui.texteditors.MultiPageContributor"
+ entities="FileESB101"
+ icon="images/xstudio/editors/esb.gif"
+ name="ESB">
+ </xmlEditor>
+ </extension>
+
+ <extension point="org.jboss.tools.common.model.classes">
+ <xclass id="org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ class="org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"/>
+ </extension>
+
+</plugin>
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/ui/wizard/newfile/ESB_File_wiz.png
===================================================================
(Binary files differ)
Property changes on:
trunk/esb/plugins/org.jboss.tools.esb.ui/resources/org/jboss/tools/esb/ui/wizard/newfile/ESB_File_wiz.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java 2008-02-18
11:03:44 UTC (rev 6372)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.esb.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBUIMessages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.esb.ui.messages";
//$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private ESBUIMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUiPlugin.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUiPlugin.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUiPlugin.java 2008-02-18
11:03:44 UTC (rev 6372)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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.esb.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBUiPlugin extends AbstractUIPlugin {
+ public static String PLUGIN_ID = "org.jboss.tools.esb.ui"; //$NON-NLS-1$
+ static ESBUiPlugin INSTANCE = null;
+
+ public ESBUiPlugin() {
+ INSTANCE = this;
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ public static ESBUiPlugin getDefault() {
+ return INSTANCE;
+ }
+
+ public static boolean isDebugEnabled() {
+ return INSTANCE.isDebugging();
+ }
+
+ public static void log(String msg) {
+ if(isDebugEnabled()) INSTANCE.getLog().log(new Status(Status.INFO, PLUGIN_ID,
Status.OK, msg, null));
+ }
+
+ public static void log(IStatus status) {
+ if(isDebugEnabled() || !status.isOK()) INSTANCE.getLog().log(status);
+ }
+
+ public static void log(String message, Throwable exception) {
+ INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, message,
exception));
+ }
+
+ public static void log(Throwable ex) {
+ INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK,
ESBUIMessages.getString("ESB_UI_PLUGIN_NO_MESSAGES"), ex)); //$NON-NLS-1$
+ }
+
+ public static Shell getShell() {
+ return INSTANCE.getWorkbench().getActiveWorkbenchWindow().getShell();
+ }
+}
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBListsFormLayoutData.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBListsFormLayoutData.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBListsFormLayoutData.java 2008-02-18
11:03:44 UTC (rev 6372)
@@ -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.esb.ui.editor.form;
+
+import org.jboss.tools.common.model.ui.forms.FormAttributeData;
+import org.jboss.tools.common.model.ui.forms.FormData;
+import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
+import org.jboss.tools.common.model.ui.forms.IFormData;
+import org.jboss.tools.common.model.ui.forms.ModelFormLayoutData;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBListsFormLayoutData implements ESBConstants {
+
+ static IFormData ESB_PROPERTY_LIST_DEFINITION = new FormData(
+ "Properties", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ new String[]{ENT_ESB_PROPERTY},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddProperty")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_LISTENER_LIST_DEFINITION = new FormData(
+ "Listeners", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ LISTENERS_101,
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAnyListener")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_LISTENER_SUB_LIST_DEFINITION = new FormData(
+ "Listeners", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ "Listeners", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ LISTENERS_101,
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAnyListener")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_ACTION_LIST_DEFINITION = new FormData(
+ "Actions", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ new String[]{ENT_ESB_ACTION},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAction")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_ACTION_SUB_LIST_DEFINITION = new FormData(
+ "Actions", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ "Actions", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ new String[]{ENT_ESB_ACTION},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAction")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_SERVICE_LIST_DEFINITION = new FormData(
+ "Services", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ new String[]{ENT_ESB_SERVICE},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddService")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_SERVICE_SUB_LIST_DEFINITION = new FormData(
+ "Services", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ "Services", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ new String[]{ENT_ESB_SERVICE},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddService")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_PROVIDER_LIST_DEFINITION = new FormData(
+ "Providers", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ PROVIDERS_101,
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAnyProvider")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_PROVIDER_SUB_LIST_DEFINITION = new FormData(
+ "Providers", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ "Providers", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 100)},
+ PROVIDERS_101,
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAnyProvider")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_BUS_LIST_DEFINITION = new FormData(
+ "Bus list", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData("bus id", 100)},
+ BUSES_101,
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddBus")
//$NON-NLS-1$
+ );
+
+ static IFormData ESB_SCHEDULE_LIST_DEFINITION = new FormData(
+ "Schedule List", //$NON-NLS-1$
+ ModelFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData("schedule id", 100)},
+ new String[]{ENT_ESB_SIMPLE_SCHEDULE, ENT_ESB_CRON_SCHEDULE},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddAnySchedule")
//$NON-NLS-1$
+ );
+}
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBXMLFormLayoutData.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBXMLFormLayoutData.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/form/ESBXMLFormLayoutData.java 2008-02-18
11:03:44 UTC (rev 6372)
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.esb.ui.editor.form;
+
+import java.util.*;
+
+import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
+import org.jboss.tools.common.model.util.ClassLoaderUtil;
+import org.jboss.tools.common.model.ui.forms.*;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBXMLFormLayoutData implements IFormLayoutData, ESBConstants {
+ static {
+ ClassLoaderUtil.init();
+ }
+
+ public static String EMPTY_DESCRIPTION = ""; //$NON-NLS-1$
+
+ private final static IFormData[] FORM_LAYOUT_DEFINITIONS = new IFormData[] {
+
+
+ };
+
+ private static Map<String,IFormData> FORM_LAYOUT_DEFINITION_MAP =
Collections.synchronizedMap(new ArrayToMap(FORM_LAYOUT_DEFINITIONS));
+
+ private static ESBXMLFormLayoutData INSTANCE = new ESBXMLFormLayoutData();
+
+ public static IFormLayoutData getInstance() {
+ return INSTANCE;
+ }
+
+ private ESBXMLFormLayoutData() {}
+
+ public IFormData getFormData(String entityName) {
+ IFormData data = (IFormData)FORM_LAYOUT_DEFINITION_MAP.get(entityName);
+ if(data == null) {
+ data = generateDefaultFormData(entityName);
+ }
+ return data;
+ }
+
+ private IFormData generateDefaultFormData(String entityName) {
+ IFormData data = null;
+ XModelEntity entity = XModelMetaDataImpl.getInstance().getEntity(entityName);
+ if(entity != null) {
+ data = generateDefaultFormData(entity);
+ }
+ if(data != null) {
+ FORM_LAYOUT_DEFINITION_MAP.put(entityName, data);
+ }
+ return data;
+ }
+
+ private IFormData generateDefaultFormData(XModelEntity entity) {
+ String entityName = entity.getName();
+ List<IFormData> list = new ArrayList<IFormData>();
+ IFormData g = ModelFormLayoutData.createGeneralFormData(entity);
+ if(g != null) list.add(g);
+ if(entity.getChild(ENT_ESB_PROPERTY) != null) {
+ list.add(ESBListsFormLayoutData.ESB_PROPERTY_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_LISTENERS)) {
+ list.add(ESBListsFormLayoutData.ESB_LISTENER_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_ACTIONS)) {
+ list.add(ESBListsFormLayoutData.ESB_ACTION_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_SERVICES)) {
+ list.add(ESBListsFormLayoutData.ESB_SERVICE_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_SERVICE)) {
+ list.add(ESBListsFormLayoutData.ESB_LISTENER_SUB_LIST_DEFINITION);
+ list.add(ESBListsFormLayoutData.ESB_ACTION_SUB_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_PROVIDERS)) {
+ list.add(ESBListsFormLayoutData.ESB_PROVIDER_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_FILE_101)) {
+ list.add(ESBListsFormLayoutData.ESB_PROVIDER_SUB_LIST_DEFINITION);
+ list.add(ESBListsFormLayoutData.ESB_SERVICE_SUB_LIST_DEFINITION);
+ } else if(entityName.equals(ENT_ESB_PROPERTY)) {
+ list.add(ModelFormLayoutData.TAG_LIST);
+ }
+ if(entityName.equals(ENT_ESB_SCHEDULE_PROVIDER)) {
+ list.add(ESBListsFormLayoutData.ESB_SCHEDULE_LIST_DEFINITION);
+ }
+ if(entity.getChild(ENT_ESB_BUS) != null) {
+ list.add(ESBListsFormLayoutData.ESB_BUS_LIST_DEFINITION);
+ }
+ IFormData a = ModelFormLayoutData.createAdvancedFormData(entityName);
+ if(a != null) list.add(a);
+ IFormData[] ds = list.toArray(new IFormData[0]);
+ IFormData data = new FormData(entityName, new String[]{null}, ds);
+ return data;
+ }
+
+}
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties 2008-02-18
11:03:44 UTC (rev 6372)
@@ -0,0 +1 @@
+ESB_UI_PLUGIN_NO_MESSAGES=No message
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/newfile/NewESBFileWizard.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/newfile/NewESBFileWizard.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/newfile/NewESBFileWizard.java 2008-02-18
11:03:44 UTC (rev 6372)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.esb.ui.wizard.newfile;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.common.model.ui.wizard.newfile.NewFileContextEx;
+import org.jboss.tools.common.model.ui.wizard.newfile.NewFileWizardEx;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class NewESBFileWizard extends NewFileWizardEx {
+
+ public NewESBFileWizard() {
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(NewESBFileWizard.class,
"ESB_File_wiz.png")); //$NON-NLS-1$
+ }
+
+ protected NewFileContextEx createNewFileContext() {
+ return new NewESBFileContext();
+ }
+
+ class NewESBFileContext extends NewFileContextEx {
+ protected String getActionPath() {
+ return "CreateActions.CreateFiles.ESB.CreateFileESB"; //$NON-NLS-1$
+ }
+ }
+
+}