Author: vyemialyanchyk
Date: 2009-07-02 14:30:20 -0400 (Thu, 02 Jul 2009)
New Revision: 16356
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UiPlugin.java
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UIVEditorMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UIVEditorMessages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/VisualEditorPlugin.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4524 - rename veditor plugin
Copied:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram
(from rev 16317,
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor)
Copied:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
(from rev 16317,
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/UIVEditorMessages.java)
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java 2009-07-02
18:30:20 UTC (rev 16356)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram;
+
+import org.eclipse.osgi.util.NLS;
+
+public class DiagramViewerMessages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages"; //$NON-NLS-1$
+
+ private DiagramViewerMessages() {
+ }
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, DiagramViewerMessages.class);
+ }
+
+ public static String EditorActionContributor_refresh_visual_mapping;
+ public static String DiagramViewer_diagram_for;
+ public static String ExportImageAction_bmp_format;
+ public static String ExportImageAction_error;
+ public static String ExportImageAction_failed_to_export_image;
+ public static String ExportImageAction_jpg_format;
+ public static String ExportImageAction_png_format;
+ public static String OpenMappingAction_canot_find_or_open_mapping_file;
+ public static String OpenMappingAction_open_mapping_file;
+ public static String OpenSourceAction_canot_find_source_file;
+ public static String OpenSourceAction_canot_open_source_file;
+ public static String OpenSourceAction_open_source_file;
+ public static String ShapeSetConstraintCommand_move;
+ public static String PartFactory_canot_create_part_for_model_element;
+ public static String PartFactory_null;
+}
Copied:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
(from rev 16317,
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/UIVEditorMessages.properties)
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties 2009-07-02
18:30:20 UTC (rev 16356)
@@ -0,0 +1,15 @@
+EditorActionContributor_refresh_visual_mapping=Refresh Visual Mapping
+DiagramViewer_diagram_for=Diagram for
+ExportImageAction_bmp_format=Bitmap format (*.bmp)
+ExportImageAction_error=Error
+ExportImageAction_failed_to_export_image=Failed to export image:
+ExportImageAction_jpg_format=JPEG format (*.jpg)
+ExportImageAction_png_format=PNG format (*.png)
+OpenMappingAction_canot_find_or_open_mapping_file=Can't find or open mapping file.
+OpenMappingAction_open_mapping_file=Open Mapping File
+OpenSourceAction_canot_find_source_file=Can't find source file.
+OpenSourceAction_canot_open_source_file=Can't open source file.
+OpenSourceAction_open_source_file=Open Source File
+ShapeSetConstraintCommand_move=move
+PartFactory_canot_create_part_for_model_element=Can't create part for model element:
+PartFactory_null=null
Deleted:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UIVEditorMessages.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/UIVEditorMessages.java 2009-07-01
10:59:16 UTC (rev 16317)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UIVEditorMessages.java 2009-07-02
18:30:20 UTC (rev 16356)
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.ui.veditor;
-
-import org.eclipse.osgi.util.NLS;
-
-public class UIVEditorMessages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.hibernate.ui.veditor.UIVEditorMessages"; //$NON-NLS-1$
-
- private UIVEditorMessages() {
- }
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, UIVEditorMessages.class);
- }
-
- public static String EditorActionContributor_refresh_visual_mapping;
- public static String VisualEditor_diagram_for;
- public static String ExportImageAction_bmp_format;
- public static String ExportImageAction_error;
- public static String ExportImageAction_failed_to_export_image;
- public static String ExportImageAction_jpg_format;
- public static String ExportImageAction_png_format;
- public static String OpenMappingAction_canot_find_or_open_mapping_file;
- public static String OpenMappingAction_open_mapping_file;
- public static String OpenSourceAction_canot_find_source_file;
- public static String OpenSourceAction_canot_open_source_file;
- public static String OpenSourceAction_open_source_file;
- public static String ShapeSetConstraintCommand_move;
- public static String PartFactory_canot_create_part_for_model_element;
- public static String PartFactory_null;
-}
Deleted:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UIVEditorMessages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/UIVEditorMessages.properties 2009-07-01
10:59:16 UTC (rev 16317)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UIVEditorMessages.properties 2009-07-02
18:30:20 UTC (rev 16356)
@@ -1,15 +0,0 @@
-EditorActionContributor_refresh_visual_mapping=Refresh Visual Mapping
-VisualEditor_diagram_for=Diagram for
-ExportImageAction_bmp_format=Bitmap format (*.bmp)
-ExportImageAction_error=Error
-ExportImageAction_failed_to_export_image=Failed to export image:
-ExportImageAction_jpg_format=JPEG format (*.jpg)
-ExportImageAction_png_format=PNG format (*.png)
-OpenMappingAction_canot_find_or_open_mapping_file=Can't find or open mapping file.
-OpenMappingAction_open_mapping_file=Open Mapping File
-OpenSourceAction_canot_find_source_file=Can't find source file.
-OpenSourceAction_canot_open_source_file=Can't open source file.
-OpenSourceAction_open_source_file=Open Source File
-ShapeSetConstraintCommand_move=move
-PartFactory_canot_create_part_for_model_element=Can't create part for model element:
-PartFactory_null=null
Copied:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UiPlugin.java
(from rev 16317,
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java)
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UiPlugin.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/UiPlugin.java 2009-07-02
18:30:20 UTC (rev 16356)
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+
+public class UiPlugin extends AbstractUIPlugin {
+
+ public final static String ID = "org.jboss.tools.hibernate.ui"; //$NON-NLS-1$
+
+ //The shared instance.
+ private static UiPlugin plugin;
+
+ public UiPlugin() {
+ setPlugin(this);
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ setPlugin(null);
+ }
+
+ public static UiPlugin getDefault() {
+ return plugin;
+ }
+
+ private static void setPlugin(UiPlugin plugin) {
+ UiPlugin.plugin = plugin;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
+ }
+
+ public static ImageDescriptor getImageDescriptor2(String name) {
+ final String iconPath = "images/"; //$NON-NLS-1$
+ final URL installURL = getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
+ URL url = null;
+ try {
+ url = new URL(installURL, iconPath + name);
+ } catch (MalformedURLException e) {
+ }
+ return ImageDescriptor.createFromURL(url);
+ }
+
+ public static IWorkbenchPage getPage(){
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window.getActivePage();
+ }
+
+ public static Shell getShell(){
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window.getShell();
+ }
+}
Deleted:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/VisualEditorPlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/VisualEditorPlugin.java 2009-07-01
10:59:16 UTC (rev 16317)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/diagram/VisualEditorPlugin.java 2009-07-02
18:30:20 UTC (rev 16356)
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.ui.veditor;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.jboss.tools.hibernate.ui.view.BaseUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class VisualEditorPlugin extends BaseUIPlugin {
-
- public final static String PLUGIN_ID= "org.jboss.tools.hibernate.ui.veditor";
//$NON-NLS-1$
-
- //The shared instance.
- private static VisualEditorPlugin plugin;
-
- public VisualEditorPlugin() {
- setPlugin(this);
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- setPlugin(null);
- }
-
- public static VisualEditorPlugin getDefault() {
- return plugin;
- }
-
- private static void setPlugin(VisualEditorPlugin plugin) {
- VisualEditorPlugin.plugin = plugin;
- }
-
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public static IWorkbenchPage getPage(){
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- return window.getActivePage();
- }
-
- public static Shell getShell(){
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- return window.getShell();
- }
-}