Source Code Cross Referenced for XSLTEditPart.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » ui » componentflow » componentFlowEditor » diagram » edit » parts » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » cbesb 1.2 » com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.edit.parts 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * ChainBuilder ESB
0003:         *          Visual Enterprise Integration
0004:         * 
0005:         * Copyright (C) 2006 Bostech Corporation
0006:         * 
0007:         * This program is free software; you can redistribute it and/or modify it 
0008:         * under the terms of the GNU General Public License as published by the 
0009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
0010:         * any later version.
0011:         *
0012:         * This program is distributed in the hope that it will be useful, 
0013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
0014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
0015:         * for more details.
0016:         * 
0017:         * You should have received a copy of the GNU General Public License along with 
0018:         * this program; if not, write to the Free Software Foundation, Inc., 
0019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0020:         *
0021:         *
0022:         * $Id$
0023:         */
0024:        package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.edit.parts;
0025:
0026:        import java.util.HashMap;
0027:        import java.util.Iterator;
0028:        import java.util.List;
0029:
0030:        import org.eclipse.draw2d.BorderLayout;
0031:        import org.eclipse.draw2d.ChopboxAnchor;
0032:        import org.eclipse.draw2d.ConnectionAnchor;
0033:        import org.eclipse.draw2d.Figure;
0034:        import org.eclipse.draw2d.IFigure;
0035:        import org.eclipse.draw2d.ImageFigure;
0036:        import org.eclipse.draw2d.PositionConstants;
0037:        import org.eclipse.draw2d.StackLayout;
0038:        import org.eclipse.draw2d.ToolbarLayout;
0039:        import org.eclipse.draw2d.geometry.Point;
0040:        import org.eclipse.draw2d.geometry.Rectangle;
0041:        import org.eclipse.emf.common.command.AbstractCommand;
0042:        import org.eclipse.emf.common.command.CompoundCommand;
0043:        import org.eclipse.emf.common.notify.Notification;
0044:        import org.eclipse.emf.common.notify.impl.AdapterImpl;
0045:        import org.eclipse.emf.ecore.EAnnotation;
0046:        import org.eclipse.emf.ecore.EClass;
0047:        import org.eclipse.emf.ecore.EObject;
0048:        import org.eclipse.emf.ecore.EStructuralFeature;
0049:        import org.eclipse.emf.edit.command.AddCommand;
0050:        import org.eclipse.emf.edit.command.RemoveCommand;
0051:        import org.eclipse.emf.edit.command.SetCommand;
0052:        import org.eclipse.emf.transaction.RecordingCommand;
0053:        import org.eclipse.emf.transaction.TransactionalEditingDomain;
0054:        import org.eclipse.emf.transaction.util.TransactionUtil;
0055:        import org.eclipse.gef.ConnectionEditPart;
0056:        import org.eclipse.gef.EditPart;
0057:        import org.eclipse.gef.EditPolicy;
0058:        import org.eclipse.gef.GraphicalEditPart;
0059:        import org.eclipse.gef.NodeEditPart;
0060:        import org.eclipse.gef.Request;
0061:        import org.eclipse.gef.RequestConstants;
0062:        import org.eclipse.gef.commands.Command;
0063:        import org.eclipse.gef.commands.UnexecutableCommand;
0064:        import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
0065:        import org.eclipse.gef.editpolicies.ComponentEditPolicy;
0066:        import org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy;
0067:        import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
0068:        import org.eclipse.gef.editpolicies.ResizableEditPolicy;
0069:        import org.eclipse.gef.requests.CreateConnectionRequest;
0070:        import org.eclipse.gef.requests.CreateRequest;
0071:        import org.eclipse.gef.requests.DirectEditRequest;
0072:        import org.eclipse.gef.requests.GroupRequest;
0073:        import org.eclipse.gef.requests.ReconnectRequest;
0074:        import org.eclipse.gmf.runtime.notation.Bounds;
0075:        import org.eclipse.gmf.runtime.notation.Edge;
0076:        import org.eclipse.gmf.runtime.notation.FillStyle;
0077:        import org.eclipse.gmf.runtime.notation.FontStyle;
0078:        import org.eclipse.gmf.runtime.notation.LineStyle;
0079:        import org.eclipse.gmf.runtime.notation.Node;
0080:        import org.eclipse.gmf.runtime.notation.NotationFactory;
0081:        import org.eclipse.gmf.runtime.notation.NotationPackage;
0082:        import org.eclipse.gmf.runtime.notation.View;
0083:        import org.eclipse.jface.wizard.WizardDialog;
0084:        import org.eclipse.swt.SWT;
0085:        import org.eclipse.swt.graphics.Color;
0086:        import org.eclipse.swt.graphics.Font;
0087:        import org.eclipse.swt.graphics.FontData;
0088:        import org.eclipse.ui.PlatformUI;
0089:
0090:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ComponentFlowEditorDocument;
0091:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ComponentFlowEditorElement;
0092:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.MessageExchange;
0093:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowFactory;
0094:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
0095:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorDiagramEditorPlugin;
0096:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorPaletteFactory;
0097:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorVisualIDRegistry;
0098:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.view.factories.DomainElementInitializer;
0099:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.view.factories.MessageExchangeViewFactory;
0100:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards.WizardUtil;
0101:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards.XSLTPropertyWizard;
0102:
0103:        /**
0104:         * @generated
0105:         */
0106:        public class XSLTEditPart extends AbstractGraphicalEditPart implements 
0107:                NodeEditPart, IUpdatableEditPart {
0108:
0109:            /**
0110:             * @generated
0111:             */
0112:            public static final int VISUAL_ID = 2004;
0113:
0114:            /**
0115:             * @generated
0116:             */
0117:            protected IFigure contentPane;
0118:
0119:            /**
0120:             * @generated
0121:             */
0122:            protected IFigure primaryShape;
0123:
0124:            /**
0125:             * @generated
0126:             */
0127:            public XSLTEditPart(View model) {
0128:                assert model instanceof  Node;
0129:                setModel(model);
0130:            }
0131:
0132:            /**
0133:             * @generated
0134:             */
0135:            protected void createEditPolicies() {
0136:                installEditPolicy(EditPolicy.COMPONENT_ROLE,
0137:                        new ComponentEditPolicy() {
0138:                            protected Command createDeleteCommand(
0139:                                    GroupRequest deleteRequest) {
0140:                                TransactionalEditingDomain editingDomain = TransactionUtil
0141:                                        .getEditingDomain(getDiagramNode()
0142:                                                .getDiagram().getElement());
0143:                                CompoundCommand cc = new CompoundCommand();
0144:                                cc
0145:                                        .append(getDomainModelRemoveCommand(editingDomain));
0146:                                cc.append(RemoveCommand.create(editingDomain,
0147:                                        getDiagramNode()));
0148:                                return new WrappingCommand(editingDomain, cc);
0149:                            }
0150:
0151:                            private org.eclipse.emf.common.command.Command getDomainModelRemoveCommand(
0152:                                    TransactionalEditingDomain editingDomain) {
0153:                                return RemoveCommand
0154:                                        .create(
0155:                                                editingDomain,
0156:                                                getDiagramNode().getElement()
0157:                                                        .eContainer(),
0158:                                                componentflowPackage.eINSTANCE
0159:                                                        .getComponentFlowEditorDocument_ComponentFlowEditorElements(),
0160:                                                getDiagramNode().getElement());
0161:                            }
0162:                        });
0163:                installEditPolicy(EditPolicy.LAYOUT_ROLE,
0164:                        new ConstrainedLayoutEditPolicy() {
0165:                            protected Command getCreateCommand(
0166:                                    CreateRequest request) {
0167:                                return UnexecutableCommand.INSTANCE;
0168:                            }
0169:
0170:                            protected Object getConstraintFor(Rectangle rect) {
0171:                                return null;
0172:                            }
0173:
0174:                            protected Object getConstraintFor(Point point) {
0175:                                return null;
0176:                            }
0177:
0178:                            protected Command createChangeConstraintCommand(
0179:                                    EditPart child, Object constraint) {
0180:                                return UnexecutableCommand.INSTANCE;
0181:                            }
0182:
0183:                            protected EditPolicy createChildEditPolicy(
0184:                                    EditPart child) {
0185:                                return new ResizableEditPolicy() {
0186:                                    public EditPart getTargetEditPart(
0187:                                            Request request) {
0188:                                        if (RequestConstants.REQ_SELECTION
0189:                                                .equals(request.getType())) {
0190:                                            return XSLTEditPart.this ;
0191:                                        }
0192:                                        return super .getTargetEditPart(request);
0193:                                    }
0194:                                };
0195:                            }
0196:                        });
0197:                installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE,
0198:                        new GraphicalNodeEditPolicy() {
0199:                            protected Command getReconnectTargetCommand(
0200:                                    ReconnectRequest request) {
0201:                                //XXX: reconnect command
0202:                                return UnexecutableCommand.INSTANCE;
0203:                            }
0204:
0205:                            protected Command getReconnectSourceCommand(
0206:                                    ReconnectRequest request) {
0207:                                //XXX: reconnect command
0208:                                return UnexecutableCommand.INSTANCE;
0209:                            }
0210:
0211:                            protected Command getConnectionCreateCommand(
0212:                                    CreateConnectionRequest request) {
0213:                                if (request instanceof  ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) {
0214:                                    ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx = (ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) request;
0215:                                    int[] visualIds = requestEx.getVisualIds();
0216:                                    CompoundCommand result = new CompoundCommand();
0217:                                    for (int i = 0; i < visualIds.length; i++) {
0218:                                        int nextVisualId = visualIds[i];
0219:                                        switch (nextVisualId) {
0220:                                        case MessageExchangeEditPart.VISUAL_ID:
0221:                                            result
0222:                                                    .append(new CreateMessageExchange4001StartCommand(
0223:                                                            requestEx));
0224:                                            break;
0225:                                        }
0226:                                    }
0227:                                    if (result.getCommandList().size() != 1
0228:                                            || !result.canExecute()) {
0229:                                        //Cannot create several connections at once.
0230:                                        //returning an unexecutable command does not change cursor to "No".
0231:                                        return null;
0232:                                    }
0233:                                    Command wrappedResult = new WrappingCommand(
0234:                                            TransactionUtil
0235:                                                    .getEditingDomain(getDiagramNode()
0236:                                                            .getDiagram()
0237:                                                            .getElement()),
0238:                                            result);
0239:                                    request.setStartCommand(wrappedResult);
0240:                                    return wrappedResult;
0241:                                }
0242:                                return null;
0243:                            }
0244:
0245:                            protected Command getConnectionCompleteCommand(
0246:                                    CreateConnectionRequest request) {
0247:                                if (request.getStartCommand() == null
0248:                                        || !request.getStartCommand()
0249:                                                .canExecute()) {
0250:                                    return UnexecutableCommand.INSTANCE;
0251:                                }
0252:                                if (request instanceof  ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) {
0253:                                    ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx = (ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) request;
0254:                                    int[] visualIds = requestEx.getVisualIds();
0255:                                    CompoundCommand result = new CompoundCommand();
0256:                                    for (int i = 0; i < visualIds.length; i++) {
0257:                                        int nextVisualId = visualIds[i];
0258:                                        switch (nextVisualId) {
0259:                                        case MessageExchangeEditPart.VISUAL_ID:
0260:                                            result
0261:                                                    .append(new CreateMessageExchange4001Command(
0262:                                                            requestEx));
0263:                                            break;
0264:                                        }
0265:                                    }
0266:                                    if (result.getCommandList().size() != 1) {
0267:                                        //Cannot create several connections at once.
0268:                                        return UnexecutableCommand.INSTANCE;
0269:                                    }
0270:                                    return new WrappingCommand(
0271:                                            TransactionUtil
0272:                                                    .getEditingDomain(getDiagramNode()
0273:                                                            .getDiagram()
0274:                                                            .getElement()),
0275:                                            result);
0276:                                }
0277:                                return UnexecutableCommand.INSTANCE;
0278:                            }
0279:                        });
0280:            }
0281:
0282:            /**
0283:             * @generated NOT
0284:             */
0285:            protected IFigure createFigure() {
0286:                IFigure invisibleRectangle = new Figure();
0287:                invisibleRectangle.setLayoutManager(new BorderLayout());
0288:                IFigure rec = new Figure();
0289:                invisibleRectangle.add(rec, BorderLayout.CENTER);
0290:                rec.setLayoutManager(new StackLayout());
0291:                IFigure shape = createNodeShape();
0292:                rec.add(shape);
0293:                contentPane = setupContentPane(shape);
0294:
0295:                IFigure decorationShape = createDecorationPane();
0296:                if (decorationShape != null) {
0297:                    rec.add(decorationShape);
0298:                }
0299:
0300:                org.eclipse.draw2d.Label fig = new org.eclipse.draw2d.Label();
0301:                fig.setText("");
0302:
0303:                ((SEFigure) shape).setFigureSENameFigure(fig);
0304:
0305:                invisibleRectangle.add(fig, BorderLayout.BOTTOM);
0306:
0307:                View view = (View) getModel();
0308:
0309:                wizardOut(view, true);
0310:
0311:                return invisibleRectangle;
0312:            }
0313:
0314:            /**
0315:             * @generated
0316:             */
0317:            protected IFigure createNodeShape() {
0318:                SEFigure figure = new SEFigure();
0319:                primaryShape = figure;
0320:                return primaryShape;
0321:            }
0322:
0323:            /**
0324:             * @generated
0325:             */
0326:            public SEFigure getPrimaryShape() {
0327:                return (SEFigure) primaryShape;
0328:            }
0329:
0330:            /**
0331:             * @generated NOT
0332:             */
0333:            private IFigure createDecorationPane() {
0334:                View view = (View) getModel();
0335:                EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
0336:                /*if (annotation == null) {
0337:                 return null;
0338:                 }*/
0339:
0340:                Figure decorationPane = new Figure();
0341:                decorationPane.setLayoutManager(new BorderLayout());
0342:
0343:                ImageFigure imageFigure = new ImageFigure(
0344:                        ComponentFlowEditorDiagramEditorPlugin.getInstance()
0345:                                .getBundledImage("icons/XSLT32.ico"),
0346:                        PositionConstants.CENTER);
0347:                decorationPane.add(imageFigure, BorderLayout.TOP);
0348:                return decorationPane;
0349:            }
0350:
0351:            /**
0352:             * Default implementation treats passed figure as content pane.
0353:             * Respects layout one may have set for generated figure.
0354:             * @param nodeShape instance of generated figure class
0355:             * @generated
0356:             */
0357:            protected IFigure setupContentPane(IFigure nodeShape) {
0358:                if (nodeShape.getLayoutManager() == null) {
0359:                    ToolbarLayout layout = new ToolbarLayout();
0360:                    layout.setSpacing(5);
0361:                    nodeShape.setLayoutManager(layout);
0362:                }
0363:                return nodeShape; // use nodeShape itself as contentPane
0364:            }
0365:
0366:            /**
0367:             * @generated
0368:             */
0369:            public IFigure getContentPane() {
0370:                if (contentPane == null) {
0371:                    return super .getContentPane();
0372:                }
0373:                return contentPane;
0374:            }
0375:
0376:            /**
0377:             * @generated
0378:             */
0379:            public Node getDiagramNode() {
0380:                return (Node) getModel();
0381:            }
0382:
0383:            /**
0384:             * @generated
0385:             */
0386:            protected boolean addFixedChild(EditPart childEditPart) {
0387:                if (childEditPart instanceof  XSLTNameEditPart) {
0388:                    ((XSLTNameEditPart) childEditPart)
0389:                            .setLabel(getPrimaryShape().getFigureSENameFigure());
0390:                    return true;
0391:                }
0392:                return false;
0393:            }
0394:
0395:            /**
0396:             * @generated
0397:             */
0398:            protected boolean removeFixedChild(EditPart childEditPart) {
0399:                return false;
0400:            }
0401:
0402:            /**
0403:             * Returns the label which should be direct-edited by default.
0404:             * @generated
0405:             */
0406:            private EditPart getPrimaryLabelEditPart() {
0407:                for (Iterator it = getDiagramNode().getChildren().iterator(); it
0408:                        .hasNext();) {
0409:                    View nextChild = (View) it.next();
0410:                    if (ComponentFlowEditorVisualIDRegistry
0411:                            .getVisualID(nextChild) == XSLTNameEditPart.VISUAL_ID) {
0412:                        return (EditPart) getViewer().getEditPartRegistry()
0413:                                .get(nextChild);
0414:                    }
0415:                }
0416:                return null;
0417:            }
0418:
0419:            /**
0420:             * @generated
0421:             */
0422:            public void performRequest(Request req) {
0423:                if (RequestConstants.REQ_DIRECT_EDIT == req.getType()) {
0424:                    EditPart labelToEdit;
0425:                    if (req instanceof  DirectEditRequest) {
0426:                        labelToEdit = getLabelEditPart((DirectEditRequest) req);
0427:                    } else {
0428:                        labelToEdit = getPrimaryLabelEditPart();
0429:                    }
0430:                    if (labelToEdit != null) {
0431:                        labelToEdit.performRequest(req);
0432:                    }
0433:                }
0434:            }
0435:
0436:            /**
0437:             * @generated
0438:             */
0439:            private EditPart getLabelEditPart(DirectEditRequest req) {
0440:                EditPart result = getViewer().findObjectAt(req.getLocation());
0441:                if (result != null) {
0442:                    View view = (View) result.getModel();
0443:                    if (getDiagramNode().getChildren().contains(view)) {
0444:                        int visualId = ComponentFlowEditorVisualIDRegistry
0445:                                .getVisualID(view);
0446:                        switch (visualId) {
0447:                        case XSLTNameEditPart.VISUAL_ID:
0448:                            return result;
0449:                        }
0450:                    }
0451:                }
0452:                return getPrimaryLabelEditPart();
0453:            }
0454:
0455:            /**
0456:             * @generated
0457:             */
0458:            protected void addChildVisual(EditPart childEditPart, int index) {
0459:                if (addFixedChild(childEditPart)) {
0460:                    return;
0461:                }
0462:                super .addChildVisual(childEditPart, -1);
0463:            }
0464:
0465:            /**
0466:             * @generated
0467:             */
0468:            protected void removeChildVisual(EditPart childEditPart) {
0469:                if (removeFixedChild(childEditPart)) {
0470:                    return;
0471:                }
0472:                super .removeChildVisual(childEditPart);
0473:            }
0474:
0475:            /**
0476:             * @generated
0477:             */
0478:            protected void refreshVisuals() {
0479:                super .refreshVisuals();
0480:                refreshBounds();
0481:                refreshBackgroundColor();
0482:                refreshForegroundColor();
0483:                refreshFont();
0484:                refreshVisibility();
0485:            }
0486:
0487:            /**
0488:             * @generated
0489:             */
0490:            protected void refreshVisibility() {
0491:                boolean isVisible = getDiagramNode().isVisible();
0492:                boolean wasVisible = getFigure().isVisible();
0493:                if (isVisible == wasVisible) {
0494:                    return;
0495:                }
0496:                if (!isVisible && (getSelected() != SELECTED_NONE)) {
0497:                    getViewer().deselect(this );
0498:                }
0499:
0500:                getFigure().setVisible(isVisible);
0501:                getFigure().revalidate();
0502:            }
0503:
0504:            /**
0505:             * @generated
0506:             */
0507:            protected void refreshBounds() {
0508:                Node node = getDiagramNode();
0509:                assert node.getLayoutConstraint() instanceof  Bounds;
0510:                Bounds bounds = (Bounds) node.getLayoutConstraint();
0511:                ((GraphicalEditPart) getParent()).setLayoutConstraint(this ,
0512:                        getFigure(), new Rectangle(bounds.getX(),
0513:                                bounds.getY(), bounds.getWidth(), bounds
0514:                                        .getHeight()));
0515:            }
0516:
0517:            /**
0518:             * @generated
0519:             */
0520:            protected List getModelChildren() {
0521:                return getDiagramNode().getVisibleChildren();
0522:            }
0523:
0524:            /**
0525:             * @generated
0526:             */
0527:            protected List getModelSourceConnections() {
0528:                return getDiagramNode().getSourceEdges();
0529:            }
0530:
0531:            /**
0532:             * @generated NOT
0533:             */
0534:            protected List getModelTargetConnections() {
0535:
0536:                return getDiagramNode().getTargetEdges();
0537:            }
0538:
0539:            /**
0540:             * @generated NOT
0541:             */
0542:            protected void adjustName() {
0543:                ComponentFlowEditorEditPartFactory.setModelName(this , "XSLT");
0544:            }
0545:
0546:            /**
0547:             * @generated NOT
0548:             */
0549:            public void wizardOut(View view, boolean newCom) {
0550:                if (newCom && !WizardUtil.canWizardOut(view))
0551:                    return;
0552:
0553:                final XSLTPropertyWizard xsltWizard = new XSLTPropertyWizard();
0554:                if (newCom) {
0555:                    xsltWizard
0556:                            .setAddedOperation((ComponentFlowEditorElement) view
0557:                                    .getElement());
0558:                    WizardDialog wizard = new WizardDialog(PlatformUI
0559:                            .getWorkbench().getActiveWorkbenchWindow()
0560:                            .getShell(), xsltWizard);
0561:                    wizard.open();
0562:                } else {
0563:                    xsltWizard
0564:                            .setUpdateOperation((ComponentFlowEditorElement) view
0565:                                    .getElement());
0566:
0567:                    TransactionalEditingDomain domain = TransactionUtil
0568:                            .getEditingDomain(view.getElement());
0569:                    domain.getCommandStack().execute(
0570:                            new RecordingCommand(domain) {
0571:
0572:                                public void doExecute() {
0573:                                    WizardDialog wizard = new WizardDialog(
0574:                                            PlatformUI.getWorkbench()
0575:                                                    .getActiveWorkbenchWindow()
0576:                                                    .getShell(), xsltWizard);
0577:                                    wizard.open();
0578:                                }
0579:                            });
0580:                }
0581:            }
0582:
0583:            /**
0584:             * @generated
0585:             */
0586:            public ConnectionAnchor getSourceConnectionAnchor(
0587:                    ConnectionEditPart connection) {
0588:                return new ChopboxAnchor(getFigure());
0589:            }
0590:
0591:            /**
0592:             * @generated
0593:             */
0594:            public ConnectionAnchor getSourceConnectionAnchor(Request request) {
0595:                return new ChopboxAnchor(getFigure());
0596:            }
0597:
0598:            /**
0599:             * @generated
0600:             */
0601:            public ConnectionAnchor getTargetConnectionAnchor(
0602:                    ConnectionEditPart connection) {
0603:                return new ChopboxAnchor(getFigure());
0604:            }
0605:
0606:            /**
0607:             * @generated
0608:             */
0609:            public ConnectionAnchor getTargetConnectionAnchor(Request request) {
0610:                return new ChopboxAnchor(getFigure());
0611:            }
0612:
0613:            /**
0614:             * @generated
0615:             */
0616:            public Object getAdapter(Class key) {
0617:                return super .getAdapter(key);
0618:            }
0619:
0620:            /**
0621:             * @generated
0622:             */
0623:            public void activate() {
0624:                super .activate();
0625:                getDiagramNode().getElement().eAdapters().add(
0626:                        domainModelRefresher);
0627:            }
0628:
0629:            /**
0630:             * @generated
0631:             */
0632:            public void deactivate() {
0633:                getDiagramNode().getElement().eAdapters().remove(
0634:                        domainModelRefresher);
0635:                super .deactivate();
0636:            }
0637:
0638:            /**
0639:             * @generated
0640:             */
0641:            private DomainModelRefresher domainModelRefresher = new DomainModelRefresher();
0642:
0643:            /**
0644:             * @generated
0645:             */
0646:            private class DomainModelRefresher extends AdapterImpl {
0647:                /**
0648:                 * @generated NOT
0649:                 */
0650:                public void notifyChanged(Notification msg) {
0651:                    super .notifyChanged(msg);
0652:                    if (msg.isTouch()) {
0653:                        return;
0654:                    }
0655:                    Refresher refresher = getRefresher((EStructuralFeature) msg
0656:                            .getFeature(), msg);
0657:                    if (refresher != null) {
0658:                        refresher.refresh();
0659:                    }
0660:                    adjustName();
0661:                }
0662:            }
0663:
0664:            /**
0665:             * @generated
0666:             */
0667:            public void addRefresher(EStructuralFeature feature,
0668:                    Refresher refresher) {
0669:                CompositeRefresher compositeRefresher = getCompositeRefresher(feature);
0670:                compositeRefresher.addRefresher(refresher);
0671:            }
0672:
0673:            /**
0674:             * @generated
0675:             */
0676:            public void removeRefresher(EStructuralFeature feature,
0677:                    Refresher refresher) {
0678:                CompositeRefresher compositeRefresher = getCompositeRefresher(feature);
0679:                compositeRefresher.removeRefresher(refresher);
0680:            }
0681:
0682:            /**
0683:             * @generated
0684:             */
0685:            private CompositeRefresher getCompositeRefresher(
0686:                    EStructuralFeature feature) {
0687:                if (structuralFeatures2Refresher == null) {
0688:                    createRefreshers();
0689:                }
0690:                Refresher refresher = (Refresher) structuralFeatures2Refresher
0691:                        .get(feature);
0692:                if (refresher instanceof  CompositeRefresher) {
0693:                    return (CompositeRefresher) refresher;
0694:                }
0695:                CompositeRefresher result = new CompositeRefresher();
0696:                if (refresher != null) {
0697:                    result.addRefresher(refresher);
0698:                }
0699:                structuralFeatures2Refresher.put(feature, result);
0700:                return result;
0701:            }
0702:
0703:            /**
0704:             * @generated
0705:             */
0706:            protected void refreshFont() {
0707:                FontStyle style = (FontStyle) getDiagramNode().getStyle(
0708:                        NotationPackage.eINSTANCE.getFontStyle());
0709:                Font toDispose = createdFont;
0710:                if (style != null) {
0711:                    String fontName = style.getFontName();
0712:                    int fontHeight = style.getFontHeight();
0713:                    int fontStyle = SWT.NORMAL;
0714:                    if (style.isBold()) {
0715:                        fontStyle |= SWT.BOLD;
0716:                    }
0717:                    if (style.isItalic()) {
0718:                        fontStyle |= SWT.ITALIC;
0719:                    }
0720:                    Font currentFont = getFigure().getFont();
0721:                    if (currentFont != null) {
0722:                        FontData currentFontData = currentFont.getFontData()[0];
0723:                        if (currentFontData.getName().equals(fontName)
0724:                                && currentFontData.getHeight() == fontHeight
0725:                                && currentFontData.getStyle() == fontStyle) {
0726:                            return;
0727:                        }
0728:                    }
0729:                    createdFont = new Font(null, fontName, fontHeight,
0730:                            fontStyle);
0731:                    getFigure().setFont(createdFont);
0732:                } else {
0733:                    //revert to the default font
0734:                    getFigure().setFont(getViewer().getControl().getFont());
0735:                    createdFont = null;
0736:                }
0737:                if (toDispose != null) {
0738:                    toDispose.dispose();
0739:                }
0740:            }
0741:
0742:            /**
0743:             * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned).
0744:             * Whenever another non-default font is assigned to it, it is safe to dispose the previous one.
0745:             * @generated
0746:             */
0747:            private Font createdFont;
0748:
0749:            /**
0750:             * @generated
0751:             */
0752:            protected void refreshForegroundColor() {
0753:                LineStyle style = (LineStyle) getDiagramNode().getStyle(
0754:                        NotationPackage.eINSTANCE.getLineStyle());
0755:                Color toDispose = createdForegroundColor;
0756:                if (style != null) {
0757:                    int foregroundColor = style.getLineColor();
0758:                    int red = foregroundColor & 0x000000FF;
0759:                    int green = (foregroundColor & 0x0000FF00) >> 8;
0760:                    int blue = (foregroundColor & 0x00FF0000) >> 16;
0761:                    Color currentColor = getFigure().getForegroundColor();
0762:                    if (currentColor != null && currentColor.getRed() == red
0763:                            && currentColor.getGreen() == green
0764:                            && currentColor.getBlue() == blue) {
0765:                        return;
0766:                    }
0767:                    createdForegroundColor = new Color(null, red, green, blue);
0768:                    getFigure().setForegroundColor(createdForegroundColor);
0769:                } else {
0770:                    getFigure().setForegroundColor(
0771:                            getViewer().getControl().getForeground());
0772:                    createdForegroundColor = null;
0773:                }
0774:                if (toDispose != null) {
0775:                    toDispose.dispose();
0776:                }
0777:            }
0778:
0779:            /**
0780:             * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure.
0781:             * Whenever another color is assigned to it, it is safe to dispose the previous one.
0782:             * @generated
0783:             */
0784:            private Color createdForegroundColor;
0785:
0786:            /**
0787:             * @generated
0788:             */
0789:            protected void refreshBackgroundColor() {
0790:                FillStyle style = (FillStyle) getDiagramNode().getStyle(
0791:                        NotationPackage.eINSTANCE.getFillStyle());
0792:                Color toDispose = createdBackgroundColor;
0793:                if (style != null) {
0794:                    int backgroundColor = style.getFillColor();
0795:                    int red = backgroundColor & 0x000000FF;
0796:                    int green = (backgroundColor & 0x0000FF00) >> 8;
0797:                    int blue = (backgroundColor & 0x00FF0000) >> 16;
0798:                    Color currentColor = getFigure().getBackgroundColor();
0799:                    if (currentColor != null && currentColor.getRed() == red
0800:                            && currentColor.getGreen() == green
0801:                            && currentColor.getBlue() == blue) {
0802:                        return;
0803:                    }
0804:                    createdBackgroundColor = new Color(null, red, green, blue);
0805:                    getFigure().setBackgroundColor(createdBackgroundColor);
0806:                } else {
0807:                    getFigure().setBackgroundColor(
0808:                            getViewer().getControl().getBackground());
0809:                }
0810:                if (toDispose != null) {
0811:                    toDispose.dispose();
0812:                }
0813:            }
0814:
0815:            /**
0816:             * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure.
0817:             * Whenever another color is assigned to it, it is safe to dispose the previous one.
0818:             * @generated
0819:             */
0820:            private Color createdBackgroundColor;
0821:
0822:            /**
0823:             * @generated
0824:             */
0825:            private HashMap structuralFeatures2Refresher;
0826:
0827:            /**
0828:             * @generated
0829:             */
0830:            public Refresher getRefresher(EStructuralFeature feature,
0831:                    Notification msg) {
0832:                if (structuralFeatures2Refresher == null) {
0833:                    createRefreshers();
0834:                }
0835:                return (Refresher) structuralFeatures2Refresher.get(feature);
0836:            }
0837:
0838:            /**
0839:             * @generated NOT
0840:             */
0841:            private void createRefreshers() {
0842:                structuralFeatures2Refresher = new HashMap();
0843:                Refresher childrenRefresher = new Refresher() {
0844:                    public void refresh() {
0845:                        refreshChildren();
0846:                    }
0847:                };
0848:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0849:                        .getView_PersistedChildren(), childrenRefresher);
0850:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0851:                        .getView_TransientChildren(), childrenRefresher);
0852:                Refresher boundsRefresher = new Refresher() {
0853:                    public void refresh() {
0854:                        refreshBounds();
0855:                    }
0856:                };
0857:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0858:                        .getNode_LayoutConstraint(), boundsRefresher);
0859:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0860:                        .getSize_Width(), boundsRefresher);
0861:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0862:                        .getSize_Height(), boundsRefresher);
0863:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0864:                        .getLocation_X(), boundsRefresher);
0865:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0866:                        .getLocation_Y(), boundsRefresher);
0867:                Refresher visibilityRefresher = new Refresher() {
0868:                    public void refresh() {
0869:                        refreshVisibility();
0870:                    }
0871:                };
0872:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0873:                        .getView_Visible(), visibilityRefresher);
0874:                Refresher sourceEdgesRefresher = new Refresher() {
0875:                    public void refresh() {
0876:                        refreshSourceConnections();
0877:                    }
0878:                };
0879:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0880:                        .getView_SourceEdges(), sourceEdgesRefresher);
0881:                Refresher targetEdgesRefresher = new Refresher() {
0882:                    public void refresh() {
0883:                        refreshTargetConnections();
0884:                    }
0885:                };
0886:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0887:                        .getView_TargetEdges(), targetEdgesRefresher);
0888:                Refresher fontRefresher = new Refresher() {
0889:                    public void refresh() {
0890:                        refreshFont();
0891:                    }
0892:                };
0893:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0894:                        .getFontStyle_FontHeight(), fontRefresher);
0895:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0896:                        .getFontStyle_FontName(), fontRefresher);
0897:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0898:                        .getFontStyle_Bold(), fontRefresher);
0899:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0900:                        .getFontStyle_Italic(), fontRefresher);
0901:
0902:                Refresher backgroundColorRefresher = new Refresher() {
0903:                    public void refresh() {
0904:                        refreshBackgroundColor();
0905:                    }
0906:                };
0907:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0908:                        .getFillStyle_FillColor(), backgroundColorRefresher);
0909:                Refresher foregroundColorRefresher = new Refresher() {
0910:                    public void refresh() {
0911:                        refreshForegroundColor();
0912:                    }
0913:                };
0914:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0915:                        .getLineStyle_LineColor(), foregroundColorRefresher);
0916:            }
0917:
0918:            /**
0919:             * @generated
0920:             */
0921:            private static class CreateMessageExchange4001StartCommand extends
0922:                    AbstractCommand {
0923:                /**
0924:                 * @generated
0925:                 */
0926:                private View source;
0927:
0928:                /**
0929:                 * @generated
0930:                 */
0931:                public CreateMessageExchange4001StartCommand(
0932:                        ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx) {
0933:                    //Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart().
0934:                    source = (View) requestEx.getTargetEditPart().getModel();
0935:                }
0936:
0937:                /**
0938:                 * @generated
0939:                 */
0940:                public void execute() {
0941:                    //This command never gets executed
0942:                }
0943:
0944:                /**
0945:                 * @generated
0946:                 */
0947:                public void undo() {
0948:                    //This command never gets executed
0949:                }
0950:
0951:                /**
0952:                 * @generated
0953:                 */
0954:                public void redo() {
0955:                    //This command never gets executed
0956:                }
0957:
0958:                /**
0959:                 * @generated
0960:                 */
0961:                public boolean canUndo() {
0962:                    return true;
0963:                }
0964:
0965:                /**
0966:                 * @generated
0967:                 */
0968:                protected boolean prepare() {
0969:                    if (source == null) {
0970:                        return false;
0971:                    }
0972:                    ComponentFlowEditorDocument container = (ComponentFlowEditorDocument) getRelationshipContainer(
0973:                            source.getElement(), componentflowPackage.eINSTANCE
0974:                                    .getComponentFlowEditorDocument());
0975:                    if (container == null) {
0976:                        return false;
0977:                    }
0978:
0979:                    return true;
0980:                }
0981:
0982:                /**
0983:                 * Finds container element for the new relationship of the specified type.
0984:                 * Default implementation goes up by containment hierarchy starting from
0985:                 * the specified element and returns the first element that is instance of
0986:                 * the specified container class.
0987:                 * 
0988:                 * @generated
0989:                 */
0990:                protected EObject getRelationshipContainer(EObject element,
0991:                        EClass containerClass) {
0992:                    for (; element != null; element = element.eContainer()) {
0993:                        if (containerClass.isSuperTypeOf(element.eClass())) {
0994:                            return element;
0995:                        }
0996:                    }
0997:                    return null;
0998:                }
0999:
1000:            }
1001:
1002:            /**
1003:             * @generated
1004:             */
1005:            private static class CreateMessageExchange4001Command extends
1006:                    AbstractCommand {
1007:                /**
1008:                 * @generated
1009:                 */
1010:                private final View source;
1011:
1012:                /**
1013:                 * @generated
1014:                 */
1015:                private final View target;
1016:
1017:                /**
1018:                 * @generated
1019:                 */
1020:                private final Edge createdEdge;
1021:
1022:                /**
1023:                 * @generated
1024:                 */
1025:                private final org.eclipse.emf.common.command.Command domainModelAddCommand;
1026:
1027:                /**
1028:                 * @generated
1029:                 */
1030:                public CreateMessageExchange4001Command(
1031:                        ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx) {
1032:                    if (requestEx.getSourceEditPart().getModel() instanceof  View) {
1033:                        source = (View) requestEx.getSourceEditPart()
1034:                                .getModel();
1035:                    } else {
1036:                        source = null;
1037:                    }
1038:                    if (requestEx.getTargetEditPart().getModel() instanceof  View) {
1039:                        target = (View) requestEx.getTargetEditPart()
1040:                                .getModel();
1041:                    } else {
1042:                        target = null;
1043:                    }
1044:                    if (source == null || target == null) {
1045:                        createdEdge = null;
1046:                        domainModelAddCommand = org.eclipse.emf.common.command.UnexecutableCommand.INSTANCE;
1047:                        return;
1048:                    }
1049:                    createdEdge = NotationFactory.eINSTANCE.createEdge();
1050:                    MessageExchange createdDomainElement = componentflowFactory.eINSTANCE
1051:                            .createMessageExchange();
1052:                    createdEdge.setElement(createdDomainElement);
1053:
1054:                    DomainElementInitializer.MessageExchange_4001
1055:                            .initializeElement(createdDomainElement);
1056:                    MessageExchangeViewFactory.decorateView(createdEdge);
1057:                    TransactionalEditingDomain domainModelEditDomain = TransactionUtil
1058:                            .getEditingDomain(source.getDiagram().getElement());
1059:                    org.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();
1060:                    EObject container = getRelationshipContainer(source
1061:                            .getElement(), componentflowPackage.eINSTANCE
1062:                            .getComponentFlowEditorDocument());
1063:                    if (container == null) {
1064:                        domainModelAddCommand = null;
1065:                        return;
1066:                    }
1067:                    addLinkEndsCommand
1068:                            .append(AddCommand
1069:                                    .create(
1070:                                            domainModelEditDomain,
1071:                                            container,
1072:                                            componentflowPackage.eINSTANCE
1073:                                                    .getComponentFlowEditorDocument_MessageExchanges(),
1074:                                            createdDomainElement));
1075:
1076:                    if (createdDomainElement.getSourceElement() != null) {
1077:                        domainModelAddCommand = null;
1078:                        return;
1079:                    }
1080:                    addLinkEndsCommand.append(SetCommand.create(
1081:                            domainModelEditDomain, createdDomainElement,
1082:                            componentflowPackage.eINSTANCE
1083:                                    .getMessageExchange_SourceElement(), source
1084:                                    .getElement()));
1085:
1086:                    if (createdDomainElement.getTargetElement() != null) {
1087:                        domainModelAddCommand = null;
1088:                        return;
1089:                    }
1090:                    addLinkEndsCommand.append(SetCommand.create(
1091:                            domainModelEditDomain, createdDomainElement,
1092:                            componentflowPackage.eINSTANCE
1093:                                    .getMessageExchange_TargetElement(), target
1094:                                    .getElement()));
1095:                    domainModelAddCommand = addLinkEndsCommand;
1096:                }
1097:
1098:                /**
1099:                 * Finds container element for the new relationship of the specified type.
1100:                 * Default implementation goes up by containment hierarchy starting from
1101:                 * the specified element and returns the first element that is instance of
1102:                 * the specified container class.
1103:                 * 
1104:                 * @generated
1105:                 */
1106:                protected EObject getRelationshipContainer(EObject element,
1107:                        EClass containerClass) {
1108:                    for (; element != null; element = element.eContainer()) {
1109:                        if (containerClass.isSuperTypeOf(element.eClass())) {
1110:                            return element;
1111:                        }
1112:                    }
1113:                    return null;
1114:                }
1115:
1116:                /**
1117:                 * @generated
1118:                 */
1119:                public boolean canExecute() {
1120:                    if (source == null || target == null || createdEdge == null
1121:                            || domainModelAddCommand == null
1122:                            || !domainModelAddCommand.canExecute()) {
1123:                        return false;
1124:                    }
1125:
1126:                    return true;
1127:                }
1128:
1129:                /**
1130:                 * @generated
1131:                 */
1132:                public boolean canUndo() {
1133:                    return source != null && target != null
1134:                            && createdEdge != null
1135:                            && domainModelAddCommand != null
1136:                            && domainModelAddCommand.canUndo();
1137:                }
1138:
1139:                /**
1140:                 * @generated
1141:                 */
1142:                public void execute() {
1143:                    domainModelAddCommand.execute();
1144:                    source.getDiagram().insertEdge(createdEdge);
1145:                    createdEdge.setSource(source);
1146:                    createdEdge.setTarget(target);
1147:                }
1148:
1149:                /**
1150:                 * @generated
1151:                 */
1152:                public void undo() {
1153:                    domainModelAddCommand.undo();
1154:                    source.getDiagram().removeEdge(createdEdge);
1155:                    createdEdge.setSource(null);
1156:                    createdEdge.setTarget(null);
1157:                }
1158:
1159:                /**
1160:                 * @generated
1161:                 */
1162:                public void redo() {
1163:                    execute();
1164:                }
1165:            }
1166:
1167:            /**
1168:             * @generated
1169:             */
1170:            public class SEFigure extends org.eclipse.draw2d.RectangleFigure {
1171:
1172:                /**
1173:                 * @generated
1174:                 */
1175:                public SEFigure() {
1176:
1177:                    this 
1178:                            .setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange
1179:
1180:                            );
1181:                    this .setPreferredSize(getMapMode().DPtoLP(80), getMapMode()
1182:                            .DPtoLP(50));
1183:                    createContents();
1184:                }
1185:
1186:                /**
1187:                 * @generated NOT
1188:                 */
1189:                private void createContents() {
1190:                    /*org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();
1191:                     fig_0.setText("<...>");
1192:
1193:                     setFigureSENameFigure(fig_0);
1194:
1195:                     Object layData0 = null;
1196:
1197:                     this.add(fig_0, layData0);*/
1198:                }
1199:
1200:                /**
1201:                 * @generated
1202:                 */
1203:                private org.eclipse.draw2d.Label fSENameFigure;
1204:
1205:                /**
1206:                 * @generated
1207:                 */
1208:                public org.eclipse.draw2d.Label getFigureSENameFigure() {
1209:                    return fSENameFigure;
1210:                }
1211:
1212:                /**
1213:                 * @generated
1214:                 */
1215:                private void setFigureSENameFigure(org.eclipse.draw2d.Label fig) {
1216:                    fSENameFigure = fig;
1217:                }
1218:
1219:                /**
1220:                 * @generated
1221:                 */
1222:                private boolean myUseLocalCoordinates = false;
1223:
1224:                /**
1225:                 * @generated
1226:                 */
1227:                protected boolean useLocalCoordinates() {
1228:                    return myUseLocalCoordinates;
1229:                }
1230:
1231:                /**
1232:                 * @generated
1233:                 */
1234:                protected void setUseLocalCoordinates(
1235:                        boolean useLocalCoordinates) {
1236:                    myUseLocalCoordinates = useLocalCoordinates;
1237:                }
1238:
1239:            }
1240:
1241:            /**
1242:             * @generated
1243:             */
1244:            private static class MapModeWorkaround {
1245:                /**
1246:                 * @generated
1247:                 */
1248:                public int DPtoLP(int dp) {
1249:                    return dp;
1250:                }
1251:
1252:                /**
1253:                 * @generated
1254:                 */
1255:                public static MapModeWorkaround INSTANCE = new MapModeWorkaround();
1256:            }
1257:
1258:            /**
1259:             * @generated
1260:             */
1261:            private MapModeWorkaround getMapMode() {
1262:                return MapModeWorkaround.INSTANCE;
1263:            }
1264:        }
w_w___w___._j__a___v_a_2___s_.__c___o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.