JBoss Tools SVN: r2302 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 07:20:15 -0400 (Thu, 05 Jul 2007)
New Revision: 2302
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java
Log:
JBIDE-559: Hibernate diagram editor cleanup
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java 2007-07-05 11:19:58 UTC (rev 2301)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java 2007-07-05 11:20:15 UTC (rev 2302)
@@ -1,44 +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.editors.autolayout;
-
-import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl.AutoLayoutImpl;
-import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl.Items;
-
-
-public class AutoLayout {
- AutoLayoutImpl engine = new AutoLayoutImpl();
-
- public AutoLayout() {
- this(new Items());
- }
-
- public AutoLayout(Items items) {
- setItems(items);
- }
-
- public void setGridStep(String gridStep) {
- engine.setGridStep(gridStep);
- }
-
- public void setItems(Items items) {
- engine.setItems(items);
- }
-
- public void setOverride(boolean b) {
- engine.setOverride(b);
- }
-
- public void setProcess(IDiagramInfo process) {
- engine.setProcess(process);
- }
-
-}
\ No newline at end of file
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java 2007-07-05 11:19:58 UTC (rev 2301)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java 2007-07-05 11:20:15 UTC (rev 2302)
@@ -1,132 +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.editors.autolayout;
-
-import java.util.ArrayList;
-
-public class Example {
-
- public static IDiagramInfo generateRandomProcess(int nodeCount, int linkCount) {
- ProcessInfoImpl process = new ProcessInfoImpl();
- for (int i = 0; i < nodeCount; i++) {
- ItemInfoImpl item = new ItemInfoImpl();
- item.setID("n_" + i);
- process.addItem(item);
- }
- IItemInfo[] items = process.getItems();
- for (int i = 0; i < linkCount; i++) {
- int n1 = (int)(nodeCount * Math.random());
- int n2 = (int)(nodeCount * Math.random());
- String target = ((ItemInfoImpl)items[n2]).getID();
- LinkInfoImpl link = new LinkInfoImpl();
- link.setTargetID(target);
- ((ItemInfoImpl)items[n1]).addLink(link);
- }
- return process;
- }
-
- static void printProcess(IDiagramInfo process) {
- IItemInfo[] items = process.getItems();
- for (int i = 0; i < items.length; i++) printItem(items[i]);
- }
-
- static void printItem(IItemInfo item) {
- System.out.print(item.getID() + " (");
- int[] shape = item.getShape();
- for (int i = 0; i < shape.length; i++) {
- if(i > 0) System.out.print(",");
- System.out.print(shape[i]);
- }
- System.out.print(") -->");
- ILinkInfo[] links = item.getLinks();
- for (int i = 0; i < links.length; i++) {
- if(i > 0) System.out.print(",");
- System.out.print(links[i].getTargetID());
- }
- System.out.println("");
- }
-
- public static void main(String[] args) {
- IDiagramInfo process = generateRandomProcess(10, 17);
- System.out.println("Before Layout");
- printProcess(process);
- AutoLayout layout = new AutoLayout();
- layout.setGridStep("" + 8);
- layout.setOverride(true);
- layout.setProcess(process);
- System.out.println("After Layout");
- printProcess(process);
- }
-}
-
-class ProcessInfoImpl implements IDiagramInfo {
- ArrayList items = new ArrayList();
-
- public IItemInfo[] getItems() {
- return (IItemInfo[])items.toArray(new IItemInfo[0]);
- }
-
- public void addItem(IItemInfo item) {
- items.add(item);
- }
-
-}
-
-class ItemInfoImpl implements IItemInfo {
- String id = "";
- int[] shape = new int[0];
- ArrayList links = new ArrayList();
-
- public void setID(String id) {
- this.id = id;
- }
-
- public String getID() {
- return id;
- }
-
- public boolean isComment() {
- return false;
- }
-
- public int[] getShape() {
- return shape;
- }
-
- public ILinkInfo[] getLinks() {
- return (ILinkInfo[])links.toArray(new ILinkInfo[0]);
- }
-
- public void addLink(ILinkInfo link) {
- links.add(link);
- }
-
- public void setShape(int[] s) {
- this.shape = s;
- }
-
-}
-
-class LinkInfoImpl implements ILinkInfo {
- String target;
-
- public void setTargetID(String target) {
- this.target = target;
- }
-
- public String getTargetID() {
- return target;
- }
-
- public void setLinkShape(int[] vs) {
- }
-
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java 2007-07-05 11:19:58 UTC (rev 2301)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java 2007-07-05 11:20:15 UTC (rev 2302)
@@ -1,15 +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.editors.autolayout;
-
-public interface IDiagramInfo {
- IItemInfo[] getItems();
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java 2007-07-05 11:19:58 UTC (rev 2301)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java 2007-07-05 11:20:15 UTC (rev 2302)
@@ -1,19 +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.editors.autolayout;
-
-public interface IItemInfo {
- public String getID();
- public boolean isComment();
- public int[] getShape();
- ILinkInfo[] getLinks();
- public void setShape(int[] s);
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java 2007-07-05 11:19:58 UTC (rev 2301)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java 2007-07-05 11:20:15 UTC (rev 2302)
@@ -1,16 +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.editors.autolayout;
-
-public interface ILinkInfo {
- public String getTargetID();
- public void setLinkShape(int[] vs);
-}
17 years, 6 months
JBoss Tools SVN: r2301 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 07:19:58 -0400 (Thu, 05 Jul 2007)
New Revision: 2301
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VizualEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/messages.properties
Log:
JBIDE-559: Hibernate diagram editor cleanup
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java 2007-07-05 11:19:41 UTC (rev 2300)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java 2007-07-05 11:19:58 UTC (rev 2301)
@@ -1,34 +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.editors;
-
-import org.eclipse.gef.ui.actions.ActionBarContributor;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.jboss.tools.hibernate.ui.view.ViewPlugin;
-
-public class EditorActionContributor extends ActionBarContributor {
-
- protected void buildActions() {
- IWorkbenchAction workbenchAction = ActionFactory.REFRESH.create(getPage().getWorkbenchWindow());
- workbenchAction.setImageDescriptor(ViewPlugin.getImageDescriptor(ViewPlugin.BUNDLE_IMAGE.getString("Explorer.refreshOrmGef"))); //$NON-NLS-1$
- workbenchAction.setToolTipText(Messages.EditorActionContributor_Refresh_Visual_Mapping);
- addAction(workbenchAction);
- }
-
- public void contributeToToolBar(IToolBarManager toolBarManager) {
- toolBarManager.add(getAction(ActionFactory.REFRESH.getId()));
- }
-
- protected void declareGlobalActionKeys() {
- }
-}
\ No newline at end of file
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java 2007-07-05 11:19:41 UTC (rev 2300)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java 2007-07-05 11:19:58 UTC (rev 2301)
@@ -1,26 +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.editors;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.ui.veditor.editors.messages";
-
- private Messages() {
- }
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String EditorActionContributor_Refresh_Visual_Mapping;
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java 2007-07-05 11:19:41 UTC (rev 2300)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java 2007-07-05 11:19:58 UTC (rev 2301)
@@ -1,101 +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.editors;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.DefaultEditDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.dnd.TemplateTransferDropTargetListener;
-import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
-import org.eclipse.gef.requests.CreationFactory;
-import org.eclipse.gef.requests.SimpleFactory;
-import org.eclipse.gef.ui.actions.WorkbenchPartAction;
-import org.eclipse.gef.ui.parts.GraphicalEditor;
-import org.eclipse.jface.util.TransferDropTargetListener;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.actions.ActionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.mapping.RootClass;
-import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
-import org.jboss.tools.hibernate.ui.veditor.editors.parts.OrmEditPartFactory;
-import org.jboss.tools.hibernate.ui.view.views.ObjectEditorInput;
-
-public class VisualEditor extends GraphicalEditor {
-
- private OrmDiagram ormDiagram = null;
-
- public VisualEditor() {
- setEditDomain(new DefaultEditDomain(this));
- }
-
- public void doSave(IProgressMonitor monitor) {
- ormDiagram.save();
- ormDiagram.setDirty(false);
- }
-
- public void doSaveAs() {
- }
-
- protected void initializeGraphicalViewer() {
- final GraphicalViewer viewer = getGraphicalViewer();
- viewer.setEditPartFactory(new OrmEditPartFactory());
- viewer.setRootEditPart(new ScalableFreeformRootEditPart());
- viewer.addDropTargetListener(createTransferDropTargetListener());
- viewer.setContents(ormDiagram);
- }
-
- protected void createActions() {
- getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),new WorkbenchPartAction(this){
-
- protected boolean calculateEnabled() {
- return true;
- }
- public void run() {
- ormDiagram.refresh();
- }
- });
- super.createActions();
- }
-
- private TransferDropTargetListener createTransferDropTargetListener() {
- return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
- protected CreationFactory getFactory(Object template) {
- return new SimpleFactory((Class) template);
- }
- };
- }
-
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public boolean isSaveOnCloseNeeded() {
- return true;
- }
-
- public void refreshDirty() {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
-
- public boolean isDirty() {
- return ormDiagram.isDirty();
- }
-
- protected void setInput(IEditorInput input) {
- super.setInput(input);
- ObjectEditorInput objectEditorInput = (ObjectEditorInput)input;
- Configuration configuration = objectEditorInput.getConfiguration();
- RootClass rootClass = (RootClass)(objectEditorInput).getObject();
- setPartName("Diagram for " + rootClass.getClassName());
- ormDiagram = new OrmDiagram(configuration, rootClass);
- }
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VizualEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VizualEditor.java 2007-07-05 11:19:41 UTC (rev 2300)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VizualEditor.java 2007-07-05 11:19:58 UTC (rev 2301)
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.DefaultEditDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.dnd.TemplateTransferDropTargetListener;
-import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
-import org.eclipse.gef.requests.CreationFactory;
-import org.eclipse.gef.requests.SimpleFactory;
-import org.eclipse.gef.ui.actions.WorkbenchPartAction;
-import org.eclipse.gef.ui.parts.GraphicalEditor;
-import org.eclipse.jface.util.TransferDropTargetListener;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.actions.ActionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.mapping.RootClass;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
-import org.jboss.tools.hibernate.veditor.editors.parts.OrmEditPartFactory;
-import org.jboss.tools.hibernate.view.views.ObjectEditorInput;
-
-
-/**
- * @author Konstantin Mishin
- *
- */
-public class VizualEditor extends GraphicalEditor {
-
- private OrmDiagram ormDiagram = null;
-
- public VizualEditor() {
- setEditDomain(new DefaultEditDomain(this));
- }
-
- public void doSave(IProgressMonitor monitor) {
- ormDiagram.save();
- ormDiagram.setDirty(false);
- }
-
- public void doSaveAs() {
- }
-
- protected void initializeGraphicalViewer() {
- final GraphicalViewer viewer = getGraphicalViewer();
- viewer.setEditPartFactory(new OrmEditPartFactory());
- viewer.setRootEditPart(new ScalableFreeformRootEditPart());
- viewer.addDropTargetListener(createTransferDropTargetListener());
- viewer.setContents(ormDiagram);
- }
-
- protected void createActions() {
- getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),new WorkbenchPartAction(this){
-
- protected boolean calculateEnabled() {
- return true;
- }
- public void run() {
- ormDiagram.refresh();
- }
- });
- super.createActions();
- }
-
- private TransferDropTargetListener createTransferDropTargetListener() {
- return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
- protected CreationFactory getFactory(Object template) {
- return new SimpleFactory((Class) template);
- }
- };
- }
-
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public boolean isSaveOnCloseNeeded() {
- return true;
- }
-
- public void refreshDirty() {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
-
- public boolean isDirty() {
- return ormDiagram.isDirty();
- }
-
- protected void setInput(IEditorInput input) {
- super.setInput(input);
- ObjectEditorInput objectEditorInput = (ObjectEditorInput)input;
- Configuration configuration = objectEditorInput.getConfiguration();
- RootClass rootClass = (RootClass)(objectEditorInput).getObject();
- setPartName("Diagram for " + rootClass.getClassName());
- ormDiagram = new OrmDiagram(configuration, rootClass);
- }
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/messages.properties 2007-07-05 11:19:41 UTC (rev 2300)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/messages.properties 2007-07-05 11:19:58 UTC (rev 2301)
@@ -1 +0,0 @@
-EditorActionContributor_Refresh_Visual_Mapping=Refresh Visual Mapping
17 years, 6 months
JBoss Tools SVN: r2300 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 07:19:41 -0400 (Thu, 05 Jul 2007)
New Revision: 2300
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VizualEditorPlugin.java
Log:
JBIDE-559: Hibernate diagram editor cleanup
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java 2007-07-05 11:11:34 UTC (rev 2299)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java 2007-07-05 11:19:41 UTC (rev 2300)
@@ -1,51 +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.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-import org.jboss.tools.common.log.BaseUIPlugin;
-import org.jboss.tools.common.log.IPluginLog;
-
-public class VisualEditorPlugin extends BaseUIPlugin {
-
- public final static String PLUGIN_ID= "org.jboss.tools.hibernate.ui.veditor";
-
- //The shared instance.
- private static VisualEditorPlugin plugin;
-
- public VisualEditorPlugin() {
- plugin = this;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- public static VisualEditorPlugin getDefault() {
- return plugin;
- }
-
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public static IPluginLog getPluginLog() {
- return getDefault();
- }
-
-}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VizualEditorPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VizualEditorPlugin.java 2007-07-05 11:11:34 UTC (rev 2299)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VizualEditorPlugin.java 2007-07-05 11:19:41 UTC (rev 2300)
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-import org.jboss.tools.common.log.BaseUIPlugin;
-import org.jboss.tools.common.log.IPluginLog;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class VizualEditorPlugin extends BaseUIPlugin {
-
- public final static String PLUGIN_ID= "org.jboss.tools.hibernate.veditor";
-
- //The shared instance.
- private static VizualEditorPlugin plugin;
-
- /**
- * The constructor.
- */
- public VizualEditorPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static VizualEditorPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * @return IPluginLog object
- */
- public static IPluginLog getPluginLog() {
- return getDefault();
- }
-
-}
17 years, 6 months
JBoss Tools SVN: r2299 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor: src/org/jboss/tools/hibernate/veditor/editors and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 07:11:34 -0400 (Thu, 05 Jul 2007)
New Revision: 2299
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/command/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.xml
Log:
JBIDE-559: Hibernate diagram editor cleanup
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.properties 2007-07-05 11:05:24 UTC (rev 2298)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.properties 2007-07-05 11:11:34 UTC (rev 2299)
@@ -1,2 +1,2 @@
providerName=Red Hat
-pluginName=Vizual Editor Plugin
+pluginName=Visual Editor Plugin
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.xml 2007-07-05 11:05:24 UTC (rev 2298)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/plugin.xml 2007-07-05 11:11:34 UTC (rev 2299)
@@ -4,10 +4,10 @@
<extension
point="org.eclipse.ui.editors">
<editor
- class="org.jboss.tools.hibernate.veditor.editors.VizualEditor"
- contributorClass="org.jboss.tools.hibernate.veditor.editors.EditorActionContributor"
+ class="org.jboss.tools.hibernate.ui.veditor.editors.VisualEditor"
+ contributorClass="org.jboss.tools.hibernate.ui.veditor.editors.EditorActionContributor"
icon="icons/sample.gif"
- id="org.jboss.tools.hibernate.veditor.editors.vizualeditor"
+ id="org.jboss.tools.hibernate.ui.veditor.editors.visualeditor"
name="Hibernate Diagram Viewer">
</editor>
</extension>
17 years, 6 months
JBoss Tools SVN: r2298 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor: src/org/jboss/tools/hibernate and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 07:05:24 -0400 (Thu, 05 Jul 2007)
New Revision: 2298
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/AutoLayoutImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Group.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/GroupArranger.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Groups.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Item.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Items.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/LayuotConstants.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/TransitionArranger.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/command/ShapeSetConstraintCommand.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/ComponentFigure.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundLineBorder.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundPolylineConnection.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TitleFigure.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TopLineBorder.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Connection.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ModelElement.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Shape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialOrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialRootClass.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ResourceManager.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java
Log:
JBIDE-559: Hibernate diagram editor cleanup
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF 2007-07-05 11:05:24 UTC (rev 2298)
@@ -2,7 +2,7 @@
Eclipse-LazyStart: true
Bundle-Name: %pluginName
Bundle-ClassPath: orm2-veditor.jar
-Bundle-Activator: org.jboss.tools.hibernate.veditor.VizualEditorPlugin
+Bundle-Activator: org.jboss.tools.hibernate.ui.veditor.VisualEditorPlugin
Bundle-Vendor: %providerName
Bundle-ManifestVersion: 2
Bundle-Localization: plugin
@@ -17,10 +17,10 @@
org.jboss.tools.hibernate.ui.view,
org.jboss.tools.common
Bundle-Version: 2.0.0
-Export-Package: org.jboss.tools.hibernate.veditor,
- org.jboss.tools.hibernate.veditor.editors,
- org.jboss.tools.hibernate.veditor.editors.command,
- org.jboss.tools.hibernate.veditor.editors.figures,
- org.jboss.tools.hibernate.veditor.editors.model,
- org.jboss.tools.hibernate.veditor.editors.parts
+Export-Package: org.jboss.tools.hibernate.ui.veditor,
+ org.jboss.tools.hibernate.ui.veditor.editors,
+ org.jboss.tools.hibernate.ui.veditor.editors.command,
+ org.jboss.tools.hibernate.ui.veditor.editors.figures,
+ org.jboss.tools.hibernate.ui.veditor.editors.model,
+ org.jboss.tools.hibernate.ui.veditor.editors.parts
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/VisualEditorPlugin.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.ui.plugin.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
+
+public class VisualEditorPlugin extends BaseUIPlugin {
+
+ public final static String PLUGIN_ID= "org.jboss.tools.hibernate.ui.veditor";
+
+ //The shared instance.
+ private static VisualEditorPlugin plugin;
+
+ public VisualEditorPlugin() {
+ plugin = this;
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ public static VisualEditorPlugin getDefault() {
+ return plugin;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/EditorActionContributor.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,23 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors;
import org.eclipse.gef.ui.actions.ActionBarContributor;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.jboss.tools.hibernate.view.ViewPlugin;
+import org.jboss.tools.hibernate.ui.view.ViewPlugin;
-
-
public class EditorActionContributor extends ActionBarContributor {
protected void buildActions() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/Messages.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,25 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.veditor.editors.messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.ui.veditor.editors.messages";
private Messages() {
}
static {
- // initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/VisualEditor.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.editors;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.dnd.TemplateTransferDropTargetListener;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.gef.requests.SimpleFactory;
+import org.eclipse.gef.ui.actions.WorkbenchPartAction;
+import org.eclipse.gef.ui.parts.GraphicalEditor;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.actions.ActionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.mapping.RootClass;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
+import org.jboss.tools.hibernate.ui.veditor.editors.parts.OrmEditPartFactory;
+import org.jboss.tools.hibernate.ui.view.views.ObjectEditorInput;
+
+public class VisualEditor extends GraphicalEditor {
+
+ private OrmDiagram ormDiagram = null;
+
+ public VisualEditor() {
+ setEditDomain(new DefaultEditDomain(this));
+ }
+
+ public void doSave(IProgressMonitor monitor) {
+ ormDiagram.save();
+ ormDiagram.setDirty(false);
+ }
+
+ public void doSaveAs() {
+ }
+
+ protected void initializeGraphicalViewer() {
+ final GraphicalViewer viewer = getGraphicalViewer();
+ viewer.setEditPartFactory(new OrmEditPartFactory());
+ viewer.setRootEditPart(new ScalableFreeformRootEditPart());
+ viewer.addDropTargetListener(createTransferDropTargetListener());
+ viewer.setContents(ormDiagram);
+ }
+
+ protected void createActions() {
+ getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),new WorkbenchPartAction(this){
+
+ protected boolean calculateEnabled() {
+ return true;
+ }
+ public void run() {
+ ormDiagram.refresh();
+ }
+ });
+ super.createActions();
+ }
+
+ private TransferDropTargetListener createTransferDropTargetListener() {
+ return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
+ protected CreationFactory getFactory(Object template) {
+ return new SimpleFactory((Class) template);
+ }
+ };
+ }
+
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+ public boolean isSaveOnCloseNeeded() {
+ return true;
+ }
+
+ public void refreshDirty() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+
+ public boolean isDirty() {
+ return ormDiagram.isDirty();
+ }
+
+ protected void setInput(IEditorInput input) {
+ super.setInput(input);
+ ObjectEditorInput objectEditorInput = (ObjectEditorInput)input;
+ Configuration configuration = objectEditorInput.getConfiguration();
+ RootClass rootClass = (RootClass)(objectEditorInput).getObject();
+ setPartName("Diagram for " + rootClass.getClassName());
+ ormDiagram = new OrmDiagram(configuration, rootClass);
+ }
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/AutoLayout.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,10 +8,10 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.impl.AutoLayoutImpl;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.impl.Items;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl.AutoLayoutImpl;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl.Items;
public class AutoLayout {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/Example.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout;
import java.util.ArrayList;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IDiagramInfo.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout;
public interface IDiagramInfo {
IItemInfo[] getItems();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/IItemInfo.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout;
public interface IItemInfo {
public String getID();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/ILinkInfo.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout;
public interface ILinkInfo {
public String getTargetID();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/AutoLayoutImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/AutoLayoutImpl.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/AutoLayoutImpl.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,11 +8,11 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.IItemInfo;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.ILinkInfo;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.IDiagramInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.IItemInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.ILinkInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.IDiagramInfo;
public class AutoLayoutImpl {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Group.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Group.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Group.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
import java.util.*;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/GroupArranger.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/GroupArranger.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/GroupArranger.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
public class GroupArranger {
Group group;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Groups.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Groups.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Groups.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
import java.util.*;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Item.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Item.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Item.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,12 +8,12 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
import java.util.*;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.IItemInfo;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.ILinkInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.IItemInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.ILinkInfo;
public class Item {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Items.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Items.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/Items.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,13 +8,13 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
import java.util.*;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.IItemInfo;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.ILinkInfo;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.IDiagramInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.IItemInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.ILinkInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.IDiagramInfo;
public class Items {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/LayuotConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/LayuotConstants.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/LayuotConstants.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
public class LayuotConstants {
static int DELTA_X = 200;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/TransitionArranger.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/TransitionArranger.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/autolayout/impl/TransitionArranger.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,11 +8,11 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.autolayout.impl;
+package org.jboss.tools.hibernate.ui.veditor.editors.autolayout.impl;
import java.util.ArrayList;
-import org.jboss.tools.hibernate.veditor.editors.autolayout.ILinkInfo;
+import org.jboss.tools.hibernate.ui.veditor.editors.autolayout.ILinkInfo;
public class TransitionArranger {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/command/ShapeSetConstraintCommand.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/command/ShapeSetConstraintCommand.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/command/ShapeSetConstraintCommand.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.command;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.command;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.gef.RequestConstants;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmShape;
public class ShapeSetConstraintCommand extends Command {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/ComponentFigure.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/ComponentFigure.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/ComponentFigure.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.figures;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.figures;
import java.util.List;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundLineBorder.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundLineBorder.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundLineBorder.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.figures;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.figures;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundPolylineConnection.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundPolylineConnection.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/RoundPolylineConnection.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.figures;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.figures;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.PolylineConnection;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TitleFigure.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TitleFigure.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TitleFigure.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.figures;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.figures;
import java.util.List;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TopLineBorder.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TopLineBorder.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/figures/TopLineBorder.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.figures;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.figures;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ComponentShape.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.util.Iterator;
@@ -20,10 +20,6 @@
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Table;
-/**
- * @author Konstantin Mishin
- *
- */
public class ComponentShape extends ExpandeableShape {
public static final String SET_CHILDS_HIDEN = "set childs hiden";
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Connection.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Connection.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Connection.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,19 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
-/**
- * @author Konstantin Mishin
- *
- */
public class Connection extends ModelElement {
public static final String HIDE_SELECTION = "hide selection";
public static final String SHOW_SELECTION = "show selection";
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ExpandeableShape.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.beans.PropertyChangeEvent;
import java.util.ArrayList;
@@ -16,12 +16,8 @@
import java.util.List;
import org.eclipse.swt.graphics.RGB;
-import org.jboss.tools.hibernate.veditor.editors.parts.ResourceManager;
+import org.jboss.tools.hibernate.ui.veditor.editors.parts.ResourceManager;
-/**
- * @author Konstantin Mishin
- *
- */
public class ExpandeableShape extends Shape {
public static final String SHOW_REFERENCES = "show references";
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ModelElement.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ModelElement.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/ModelElement.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,24 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.List;
-/**
- * @author Konstantin Mishin
- *
- */
public abstract class ModelElement{
private transient PropertyChangeSupport pcsDelegate = new PropertyChangeSupport(this);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.util.Iterator;
@@ -23,10 +23,6 @@
import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Table;
-/**
- * @author Konstantin Mishin
- *
- */
public class OrmShape extends ExpandeableShape {
public static final String SET_HIDEN = "set hiden";
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Shape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Shape.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/Shape.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,22 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.util.ArrayList;
import java.util.List;
-/**
- * @author Konstantin Mishin
- *
- */
public class Shape extends ModelElement {
private int indent = 0;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialOrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialOrmShape.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialOrmShape.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.util.Iterator;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialRootClass.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialRootClass.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/SpecialRootClass.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.model;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.model;
import java.util.Iterator;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ComponentShapeEditPart.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.beans.PropertyChangeEvent;
import java.util.List;
@@ -25,13 +25,9 @@
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
import org.eclipse.swt.graphics.RGB;
-import org.jboss.tools.hibernate.veditor.editors.figures.ComponentFigure;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleLabel;
-import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
-import org.jboss.tools.hibernate.veditor.editors.model.Shape;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.ComponentFigure;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ComponentShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
public class ComponentShapeEditPart extends ExpandeableShapeEditPart {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@@ -16,7 +16,6 @@
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.PolylineConnection;
-import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.editparts.AbstractConnectionEditPart;
import org.eclipse.gef.editpolicies.SelectionEditPolicy;
@@ -28,16 +27,12 @@
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Table;
-import org.jboss.tools.hibernate.veditor.editors.figures.RoundPolylineConnection;
-import org.jboss.tools.hibernate.veditor.editors.model.Connection;
-import org.jboss.tools.hibernate.veditor.editors.model.ModelElement;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.RoundPolylineConnection;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.Connection;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ModelElement;
-/**
- * @author Konstantin Mishin
- *
- */
class ConnectionEditPart extends AbstractConnectionEditPart
implements PropertyChangeListener {
@@ -83,10 +78,8 @@
private Color getColor() {
Object element = getCastedModel().getTarget().getOrmElement();
-//R if (getCastedModel().getTarget().getOrmElement() instanceof IPersistentClass)
if (element instanceof RootClass || element instanceof SingleTableSubclass)
return ResourceManager.getInstance().getColor(new RGB(210,155,100));
-//R else if (getCastedModel().getTarget().getOrmElement() instanceof IDatabaseColumn || getCastedModel().getTarget().getOrmElement() instanceof IDatabaseTable)
else if (element instanceof Column || element instanceof Table || element instanceof Property)
return ResourceManager.getInstance().getColor(new RGB(160, 160, 160));
else
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,35 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.beans.PropertyChangeEvent;
-import java.util.Iterator;
import java.util.List;
-import org.eclipse.draw2d.FocusBorder;
import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
import org.eclipse.swt.graphics.RGB;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleLabel;
-import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
-import org.jboss.tools.hibernate.veditor.editors.model.Connection;
-import org.jboss.tools.hibernate.veditor.editors.model.ExpandeableShape;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
-import org.jboss.tools.hibernate.veditor.editors.model.Shape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ExpandeableShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.Shape;
public class ExpandeableShapeEditPart extends ShapeEditPart {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/Messages.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/Messages.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,19 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.veditor.editors.parts.messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.ui.veditor.editors.parts.messages"; //$NON-NLS-1$
private Messages() {
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPart.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPart.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.util.ArrayList;
import java.util.HashMap;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmEditPartFactory.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,29 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
-import org.jboss.tools.hibernate.veditor.editors.model.ComponentShape;
-import org.jboss.tools.hibernate.veditor.editors.model.Connection;
-import org.jboss.tools.hibernate.veditor.editors.model.ExpandeableShape;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
-import org.jboss.tools.hibernate.veditor.editors.model.Shape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ComponentShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.Connection;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ExpandeableShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.Shape;
-/**
- * @author Konstantin Mishin
- *
- */
public class OrmEditPartFactory implements EditPartFactory {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.beans.PropertyChangeEvent;
@@ -33,18 +33,14 @@
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Table;
-import org.jboss.tools.hibernate.veditor.editors.figures.RoundLineBorder;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleLabel;
-import org.jboss.tools.hibernate.veditor.editors.model.ExpandeableShape;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmDiagram;
-import org.jboss.tools.hibernate.veditor.editors.model.OrmShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.RoundLineBorder;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.TitleFigure;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.TitleLabel;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ExpandeableShape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmShape;
-/**
- * @author Konstantin Mishin
- *
- */
public class OrmShapeEditPart extends ExpandeableShapeEditPart{
protected IFigure createFigure() {
@@ -119,10 +115,8 @@
protected Color getBackgroundColor() {
Object element = getCastedModel().getOrmElement();
-//R if (getCastedModel().getOrmElement() instanceof IPersistentClass)
if (element instanceof PersistentClass || element instanceof Component)
return ResourceManager.getInstance().getColor(new RGB(0,0,0));
-//R else if (getCastedModel().getOrmElement() instanceof IDatabaseTable)
else if (element instanceof Table || element instanceof Property)
return ResourceManager.getInstance().getColor(new RGB(
Integer.parseInt(Messages.Colors_DatabaseColumnR),
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ResourceManager.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ResourceManager.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ResourceManager.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.util.HashMap;
import java.util.Iterator;
@@ -20,10 +20,6 @@
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
-/**
- * @author Konstantin Mishin
- *
- */
public class ResourceManager {
private Map<RGB,Color> fColorTable = new HashMap<RGB,Color>(10);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java 2007-07-05 09:45:40 UTC (rev 2297)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java 2007-07-05 11:05:24 UTC (rev 2298)
@@ -1,14 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.veditor.editors.parts;
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.veditor.editors.parts;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@@ -42,15 +42,15 @@
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.Table;
-import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
-import org.jboss.tools.hibernate.veditor.editors.figures.TopLineBorder;
-import org.jboss.tools.hibernate.veditor.editors.model.Connection;
-import org.jboss.tools.hibernate.veditor.editors.model.ModelElement;
-import org.jboss.tools.hibernate.veditor.editors.model.Shape;
-import org.jboss.tools.hibernate.veditor.editors.model.SpecialRootClass;
-import org.jboss.tools.hibernate.view.views.OrmLabelProvider;
-import org.jboss.tools.hibernate.view.views.OrmModelImageVisitor;
-import org.jboss.tools.hibernate.view.views.OrmModelNameVisitor;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.TitleFigure;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.TopLineBorder;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.Connection;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.ModelElement;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.Shape;
+import org.jboss.tools.hibernate.ui.veditor.editors.model.SpecialRootClass;
+import org.jboss.tools.hibernate.ui.view.views.OrmLabelProvider;
+import org.jboss.tools.hibernate.ui.view.views.OrmModelImageVisitor;
+import org.jboss.tools.hibernate.ui.view.views.OrmModelNameVisitor;
public class ShapeEditPart extends
17 years, 6 months
JBoss Tools SVN: r2297 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 05:45:40 -0400 (Thu, 05 Jul 2007)
New Revision: 2297
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java
Log:
EXIN-366: Adding elements on the diagram by double-click on fields of classes which have additional information in mapping files.
Bug fixed.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java 2007-07-05 09:43:16 UTC (rev 2296)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmDiagram.java 2007-07-05 09:45:40 UTC (rev 2297)
@@ -28,6 +28,7 @@
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.DependantValue;
+import org.hibernate.mapping.Formula;
import org.hibernate.mapping.KeyValue;
import org.hibernate.mapping.ManyToOne;
import org.hibernate.mapping.Map;
@@ -36,6 +37,7 @@
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
+import org.hibernate.mapping.Set;
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Table;
@@ -207,7 +209,7 @@
private OrmShape getOrCreateDatabaseTable(Table databaseTable){
OrmShape tableShape = null;
if(databaseTable != null) {
- String tableName = databaseTable.getName() + "." + databaseTable.getName();
+ String tableName = databaseTable.getSchema() + "." + databaseTable.getName();
tableShape = (OrmShape)elements.get(tableName);
if(tableShape == null) {
tableShape = createShape(databaseTable);
@@ -253,13 +255,16 @@
Value value = ((Property)element).getValue();
iterator = value.getColumnIterator();
while (iterator.hasNext()) {
- Column databaseColumn = (Column) iterator.next();
- for (int j = 0; j < databaseColumns.size(); j++) {
- if (databaseColumn.getName().equals(((Column)((Shape)databaseColumns.get(j)).getOrmElement()).getName())) {
- Shape databaseShape = (Shape)databaseColumns.remove(j);
- new Connection(shape, databaseShape);
- databaseColumns2.add(i++, databaseShape);
- }
+ Object o = iterator.next();
+ if (o instanceof Column) {
+ Column databaseColumn = (Column)o;
+ for (int j = 0; j < databaseColumns.size(); j++) {
+ if (databaseColumn.getName().equals(((Column)((Shape)databaseColumns.get(j)).getOrmElement()).getName())) {
+ Shape databaseShape = (Shape)databaseColumns.remove(j);
+ new Connection(shape, databaseShape);
+ databaseColumns2.add(i++, databaseShape);
+ }
+ }
}
}
}
@@ -295,7 +300,12 @@
while (iterator.hasNext()) {
Connection connection = (Connection)iterator.next();
connection.setHiden(shape.getHide());
- targets.put(((Column)connection.getTarget().getOrmElement()).getName(), connection.getTarget());
+ Object el = connection.getTarget().getOrmElement();
+ if (el instanceof Column) {
+ targets.put(((Column)el).getName(), connection.getTarget());
+ } else if (el instanceof RootClass) {
+ targets.put(((RootClass)el).getClassName(), connection.getTarget());
+ }
}
KeyValue id = rootClass.getIdentifier();
iterator = id.getColumnIterator();
@@ -328,10 +338,16 @@
} else if (collection.isOneToMany()) {
OrmShape childShape = getOrCreateAssociationClass(property);
new Connection((Shape)(componentShape.getChildren().get(1)), childShape);
- } else if (collection.isMap()) {
- Map map = (Map)collection;
- OrmShape childShape = getOrCreateDatabaseTable(map.getCollectionTable());
- Shape keyShape = childShape.getChild(((DependantValue)((Shape)componentShape.getChildren().get(0)).getOrmElement()).getColumnIterator().next());
+ OrmShape keyTableShape = getOrCreateDatabaseTable(collection.getKey().getTable());
+ Iterator iter = collection.getKey().getColumnIterator();
+ while (iter.hasNext()) {
+ Column col = (Column)iter.next();
+ Shape keyColumnShape = keyTableShape.getChild(col);
+ if (keyColumnShape != null) new Connection((Shape)(componentShape.getChildren().get(0)), keyColumnShape);
+ }
+ } else if (collection.isMap() || collection.isSet()) {
+ OrmShape childShape = getOrCreateDatabaseTable(collection.getCollectionTable());
+ Shape keyShape = childShape.getChild((Column)((DependantValue)((Shape)componentShape.getChildren().get(0)).getOrmElement()).getColumnIterator().next());
new Connection((Shape)componentShape.getChildren().get(0), keyShape);
Iterator iter = ((SimpleValue)((Shape)componentShape.getChildren().get(1)).getOrmElement()).getColumnIterator();
17 years, 6 months
JBoss Tools SVN: r2296 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 05:43:16 -0400 (Thu, 05 Jul 2007)
New Revision: 2296
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
Log:
EXIN-366: Adding elements on the diagram by double-click on fields of classes which have additional information in mapping files.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-05 09:42:13 UTC (rev 2295)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-05 09:43:16 UTC (rev 2296)
@@ -153,13 +153,13 @@
}
}
- public Shape getChild(Object ormElement) {
+ public Shape getChild(Column ormElement) {
Shape shape = null;
Iterator iter = getChildren().iterator();
while (iter.hasNext()) {
Shape child = (Shape)iter.next();
Object childElement = child.getOrmElement();
- if (ormElement == childElement) {
+ if (childElement instanceof Column && ormElement.getName().equals(((Column)childElement).getName())) {
return child;
}
}
17 years, 6 months
JBoss Tools SVN: r2295 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-05 05:42:13 -0400 (Thu, 05 Jul 2007)
New Revision: 2295
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java
Log:
EXIN-366: Adding elements on the diagram by double-click on fields of classes which have additional information in mapping files.
Adding "any" element referencies.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java 2007-07-04 23:43:20 UTC (rev 2294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ShapeEditPart.java 2007-07-05 09:42:13 UTC (rev 2295)
@@ -32,6 +32,7 @@
import org.eclipse.gef.editpolicies.SelectionEditPolicy;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
+import org.hibernate.mapping.Any;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.DependantValue;
@@ -223,11 +224,10 @@
}
protected Color getSelectionColor() {
-//R if (getCastedModel().getOrmElement() instanceof IPersistentClass || getCastedModel().getOrmElement() instanceof IPersistentField || getCastedModel().getOrmElement() instanceof IHibernateValueMapping)
- if (getCastedModel().getOrmElement() instanceof PersistentClass ||
+ if (getCastedModel().getOrmElement() instanceof PersistentClass ||
getCastedModel().getOrmElement() instanceof Property ||
- getCastedModel().getOrmElement() instanceof Component ||
- getCastedModel().getOrmElement() instanceof DependantValue)
+ getCastedModel().getOrmElement() instanceof SimpleValue ||
+ getCastedModel().getOrmElement() instanceof OneToMany)
return ResourceManager.getInstance().getColor(new RGB(112,161,99));
else if (getCastedModel().getOrmElement() instanceof Table || getCastedModel().getOrmElement() instanceof Column)
return ResourceManager.getInstance().getColor(new RGB(66,173,247));
17 years, 6 months
JBoss Tools SVN: r2294 - in trunk/common/plugins: org.jboss.tools.common.model.ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-04 19:43:20 -0400 (Wed, 04 Jul 2007)
New Revision: 2294
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/ReportProblemActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
Log:
EXIN-240 more simplifications
JBIDE-560 fixed bug in abstractquerywizard message resource handling
fix various typos.
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2007-07-04 22:31:07 UTC (rev 2293)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2007-07-04 23:43:20 UTC (rev 2294)
@@ -636,8 +636,9 @@
SharableVPEEditor.show_comments=Show Comments in Visual Editor
-ReportProblemWizard.WindowTitle=Report Problems
+ReportProblemWizard.WindowTitle=Report Problemsssss
ReportProblemWizard.Title=Red Hat Developer Studio
+ReportProblemWizard.Message=Creates a zip file with information useful when reporting and debugging issues
SharableImportJSFProject.Register_Web_Context_in_server.xml=Register Web Context in server.xml
SharableImportProject.Register_Web_Context_in_server.xml=Register Web Context in server.xml
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties 2007-07-04 22:31:07 UTC (rev 2293)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties 2007-07-04 23:43:20 UTC (rev 2294)
@@ -22,12 +22,15 @@
strutsConfig.11=Struts Config 1.1
textProblemName=XML Problem
-strutsProblemName=Struts Verifification Problem
+strutsProblemName=Struts Verification Problem
actionSets.redhatMenu.label=Red Hat
actionSets.redhatMenu.description=Red Hat
actionSets.licenseMenu.label=License
-action.reportproblem.label=Report Problems
+action.reportproblem.label=Report Problem
+
+
+
action.visitsite.label=Red Hat Web Site
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/ReportProblemActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/ReportProblemActionDelegate.java 2007-07-04 22:31:07 UTC (rev 2293)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/ReportProblemActionDelegate.java 2007-07-04 23:43:20 UTC (rev 2294)
@@ -33,21 +33,14 @@
public void run(IAction action) {
ClassLoaderUtil.init();
- try {
- ReportProblemWizard wizard = new ReportProblemWizard();
- Properties p = new Properties();
- p.setProperty("help", "ReportProblemWizard");
- wizard.setObject(p);
- wizard.execute();
- } catch (Exception t) {
- ModelUIPlugin.getPluginLog().logError( "Report Problems Wizard failed.", t);
- }
+
+ ReportProblemWizard wizard = new ReportProblemWizard();
+ Properties p = new Properties();
+ p.setProperty("help", "ReportProblemWizard");
+ wizard.setObject(p);
+ wizard.execute();
}
public void selectionChanged(IAction action, ISelection selection) {}
-// protected String getUrl() {
-// return "http://www.redhat.com/strutsfeedback.htm";
-// }
-
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2007-07-04 22:31:07 UTC (rev 2293)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2007-07-04 23:43:20 UTC (rev 2294)
@@ -79,20 +79,18 @@
import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizard;
import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
-import org.osgi.framework.Bundle;
public class ReportProblemWizard extends AbstractQueryWizard {
public ReportProblemWizard() {
setView(new ReportProblemWizardView());
+
}
}
class ReportProblemWizardView extends AbstractQueryWizardView {
- static final char SEPARATOR = System.getProperty ("file.separator").charAt (0);
-
/** LOG_DATE_FORMAT */
final private SimpleDateFormat LOG_DATE_FORMAT = new SimpleDateFormat(
"dd_MMM_yyyy__HH_mm_ss_SSS");
@@ -181,7 +179,7 @@
/**
*
*/
- private byte[] getStackTracesFile() {
+ private byte[] getEclipseLogContent() {
StringBuffer sb = new StringBuffer();
try {
@@ -204,7 +202,7 @@
/**
*
*/
- private byte[] getUsercommentFile() {
+ private byte[] getUserCommentContent() {
StringBuffer sb = new StringBuffer();
sb = sb.append("email : ").append(
@@ -255,7 +253,7 @@
}
/*
- * Appends the contents of all extentions to the configurationLogSections
+ * Appends the contents of all extensions to the configurationLogSections
* extension point.
*/
private void appendExtensions(PrintWriter writer) {
@@ -290,7 +288,7 @@
/**
*
*/
- private byte[] getEclipsePropertiesFile() {
+ private byte[] getEclipsePropertiesContent() {
StringWriter out = new StringWriter();
PrintWriter writer = new PrintWriter(out);
writer.println(NLS.bind(WorkbenchMessages.SystemSummary_timeStamp,
@@ -307,47 +305,35 @@
* create a ZIP file contain following files:
*/
private void createZipFile() throws IOException {
- byte tempBuffer[];
- String[] fileNames = new String[] { "stacktrace.txt",
- "usercomment.txt", "eclipse.properties" };
-
- //
- // ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
- //
- File filename = new File(logFileName.getText());
+ File zipFilename = new File(logFileName.getText());
- ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(filename));
- for (int i = 0; i < fileNames.length; i++) {
+ ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(zipFilename));
+ try {
+ addFileToZip(getEclipseLogContent(), "eclipse.log", zout);
+ addFileToZip(getUserCommentContent(), "usercomment.txt", zout);
+ addFileToZip(getEclipsePropertiesContent(), "eclipse.properties", zout);
- switch (i) {
- case 0:
- tempBuffer = getStackTracesFile();
- break;
- case 1:
- tempBuffer = getUsercommentFile();
- break;
- case 2:
- tempBuffer = getEclipsePropertiesFile();
- break;
- default:
- tempBuffer = "Unknown data".getBytes();
-
- }
-
- ZipEntry e = new ZipEntry(fileNames[i].replace(File.separatorChar, SEPARATOR));
- zout.putNextEntry(e);
- zout.write(tempBuffer, 0, tempBuffer.length);
- zout.closeEntry();
+ ModelUIPlugin.getDefault().logInfo("Wrote diagnostic info to " + zipFilename);
+ } finally {
+ zout.close();
}
- zout.close();
- ModelUIPlugin.getDefault().logInfo("Wrote diagnostic info to " + filename);
+
//
// return byteBuffer.toString();
//
}
+ private void addFileToZip(byte[] tempBuffer, String fileName,
+ ZipOutputStream zout) throws IOException {
+
+ ZipEntry e = new ZipEntry(fileName);
+ zout.putNextEntry(e);
+ zout.write(tempBuffer, 0, tempBuffer.length);
+ zout.closeEntry();
+ }
+
/**
* Get a filename for zip-file
*
17 years, 6 months
JBoss Tools SVN: r2293 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-04 18:31:07 -0400 (Wed, 04 Jul 2007)
New Revision: 2293
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
Log:
exin-240 added widthHint to get proper layout of dialog
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2007-07-04 22:22:58 UTC (rev 2292)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2007-07-04 22:31:07 UTC (rev 2293)
@@ -428,6 +428,7 @@
t.setFont(parent.getFont());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = hspan;
+ gd.widthHint = 100;
t.setLayoutData(gd);
return t;
}
17 years, 6 months