Examples of IDiagramTypeProvider


Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

        de.getEditingDomain().getCommandStack().execute(
            new RecordingCommand(de.getEditingDomain()) {

              @Override
              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();
                CreatePEFeature peFeat = null;
                for(ICreateFeature ic :
                  fp.getCreateFeatures()) {
                  if (ic instanceof CreatePEFeature) {
                    peFeat = (CreatePEFeature) ic;
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

        de.getEditingDomain().getCommandStack().execute(
            new RecordingCommand(de.getEditingDomain()) {

              @Override
              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();
                ICreateConnectionFeature cf =
                    fp.getCreateConnectionFeatures()[0];
                CreateConnectionContext cc =
                    new CreateConnectionContext();
               
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

        de.getEditingDomain().getCommandStack().execute(
            new RecordingCommand(de.getEditingDomain()) {

              @Override
              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();

                final DeleteContext dc = new DeleteContext(
                    deleteShape);
                final IDeleteFeature df =
                    de.getDiagramTypeProvider(
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

        de.getEditingDomain().getCommandStack().execute(
            new RecordingCommand(de.getEditingDomain()) {

              @Override
              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();
                CreateStringLiteralFeature litFeat = null;
                for(ICreateFeature ic :
                  fp.getCreateFeatures()) {
                  if (ic instanceof
                      CreateStringLiteralFeature) {
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

        de.getEditingDomain().getCommandStack().execute(
            new RecordingCommand(de.getEditingDomain()) {

              @Override
              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();

                final DeleteContext dc = new DeleteContext(
                    deleteShape);
                final IDeleteFeature df =
                    de.getDiagramTypeProvider(
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

        de.getEditingDomain().getCommandStack().execute(
            new RecordingCommand(de.getEditingDomain()) {

              @Override
              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();
                CreateStringLiteralFeature litFeat = null;
                for(ICreateFeature ic : fp.getCreateFeatures()) {
                  if (ic instanceof CreateStringLiteralFeature) {
                    litFeat = (CreateStringLiteralFeature) ic;
                  }
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

  @Override
  public ICreateFeature[] getCreateFeatures() {
    ICreateFeature[] features = ProviderHelper.getCreateFeatures(this);
    AbstractNode selectedNode = null;
    IDiagramTypeProvider dtp = getDiagramTypeProvider();
    IDiagramEditor diagramEditor = dtp.getDiagramEditor();
    if (diagramEditor instanceof RiderDesignEditor) {
      RiderDesignEditor rider = (RiderDesignEditor) diagramEditor;
      selectedNode = rider.getSelectedNode();
      if (selectedNode == null) {
        selectedNode = rider.getSelectedRoute();
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

      }
  }
 
  private void initializeDiagram(Diagram diagram) {
      // set the diagram on the container
    IDiagramTypeProvider diagramTypeProvider = getDiagramTypeProvider();
    if (diagramTypeProvider == null)
      return;
   
      if (diagramTypeProvider.getDiagram() != diagram) {
        diagramTypeProvider.resourceReloaded(activeConfig.diagram);
      }

      // add the diagram contents
        getEditingDomain().getCommandStack().execute(new ImportCamelContextElementsCommand(RiderDesignEditor.this, getEditingDomain(), diagram));
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

   * (non-Javadoc)
   * @see org.eclipse.graphiti.notification.INotificationService#updatePictogramElements(org.eclipse.graphiti.mm.pictograms.PictogramElement[])
   */
  @Override
  public void updatePictogramElements(PictogramElement[] dirtyPes) {
    final IDiagramTypeProvider dtp = getDiagramTypeProvider();
    final IFeatureProvider fp = dtp.getFeatureProvider();
    for (PictogramElement pe : dirtyPes) {
      final UpdateContext updateContext = new UpdateContext(pe);
      // fp.updateIfPossible(updateContext);
      fp.updateIfPossibleAndNeeded(updateContext);
    }
View Full Code Here

Examples of org.eclipse.graphiti.dt.IDiagramTypeProvider

    return false;
  }

  @Override
  public void resourceSetChanged(ResourceSetChangeEvent event) {
    final IDiagramTypeProvider provider = diagramEditor.getDiagramTypeProvider();
    final Diagram diagram = provider.getDiagram();

    if (diagram != null && diagram.getPictogramLinks().isEmpty()) {
      return;
    }

    final Set<EObject> changedBOs = new HashSet<EObject>();
    final List<Notification> notifications = event.getNotifications();

    for (final Notification notification : notifications) {
      final Object notifier = notification.getNotifier();

      if (notifier instanceof EObject) {
        final EObject eNotifier = (EObject) notifier;

        changedBOs.add(eNotifier);
      }
    }

    final INotificationService notificationService = provider.getNotificationService();
    final PictogramElement[] dirtyPEs
      = notificationService.calculateRelatedPictogramElements(changedBOs.toArray());

    if (dirtyPEs.length > 0) {
      // do an asynchronous update in the UI thread
      Display.getDefault().asyncExec(new Runnable() {

        @Override
        public void run() {
          IDiagramEditor diagramEditor = provider.getDiagramEditor();
          if (provider.isAutoUpdateAtRuntime() && diagramEditor.isDirty()) {
            notificationService.updatePictogramElements(dirtyPEs);
          } else {
            diagramEditor.refresh();
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.