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