public ToggleSubjobsRetargetAction() {
    super(ToggleSubjobsAction.ID, ToggleSubjobsAction.TEXT, IAction.AS_CHECK_BOX);
    setToolTipText(ToggleSubjobsAction.TEXT);
    ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();

    // TODO Provides appropriate hover and disabled images
    setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.TOGGLE_SUBJOB));
    setDisabledImageDescriptor(ImageProvider.getImageDesc(ECoreImage.TOGGLE_SUBJOB_DISABLED));
  }
  public OpenExistVersionProcessAction() {
    super();

    this.setText(ACTION_LABEL);
    this.setToolTipText(ACTION_LABEL);
    this.setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.PROCESS_ICON));
  }
  public EditRoutineAction() {
    super();

    setText(Messages.getString("EditRoutineAction.text.editRoutine")); // $NON-NLS-1$
    setToolTipText(Messages.getString("EditRoutineAction.toolTipText.editRoutine")); // $NON-NLS-1$
    setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.ROUTINE_ICON));
  }
  /** Constructs a new OpenDocumentationAction. */
  public OpenDocumentationAction() {
    super();

    setText(Messages.getString("OpenDocumentationAction.openDocAction.openDoc")); // $NON-NLS-1$
    setToolTipText(
        Messages.getString("OpenDocumentationAction.openDocAcitonTipText.openDoc")); // $NON-NLS-1$
    setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.DOCUMENTATION_ICON));
  }
  /** Constructs a new ExtractDocumentationAction. */
  public ExtractDocumentationAction() {
    super();

    setText(Messages.getString("ExtractDocumentationAction.text.saveAs")); // $NON-NLS-1$
    setToolTipText(
        Messages.getString(
            "ExtractDocumentationAction.toolTipText.extractDoctoFileSys")); //$NON-NLS-1$
    setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.DOCUMENTATION_ICON));
  }
  /* (non-Javadoc)
   * @see org.eclipse.jface.wizard.Wizard#addPages()
   */
  public void addPages() {
    setWindowTitle(Messages.getString("SapTableWizard.WindowTitle"));
    setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.METADATA_TABLE_WIZ));
    this.propertiesWizardPage =
        new Step0WizardPage(
            connectionProperty,
            pathToSave,
            ERepositoryObjectType.METADATA_MDMCONNECTION,
            true,
            creation);
    this.sapTablePage =
        new SapTableWizardPage(
            this.connectionItem, functionUnit, this.metadataTable, isRepositoryObjectEditable());

    if (creation) {
      propertiesWizardPage.setTitle(
          Messages.getString("SapTableWizardPage.TitleCreate.Step1")); // $NON-NLS-1$
      propertiesWizardPage.setDescription(
          Messages.getString("SapTableWizardPage.DescriptionCreate.Step1")); // $NON-NLS-1$
      propertiesWizardPage.setPageComplete(false);

      sapTablePage.setTitle(
          Messages.getString("SapTableWizardPage.TitleCreate.Step2")); // $NON-NLS-1$
      sapTablePage.setDescription(
          Messages.getString("SapTableWizardPage.DescriptionCreate.Step2")); // $NON-NLS-1$
      sapTablePage.setPageComplete(false);

    } else {
      propertiesWizardPage.setTitle(
          Messages.getString("SapTableWizardPage.TitleUpdate.Step1")); // $NON-NLS-1$
      propertiesWizardPage.setDescription(
          Messages.getString("SapTableWizardPage.DescriptionUpdate.Step1")); // $NON-NLS-1$
      propertiesWizardPage.setPageComplete(isRepositoryObjectEditable());

      sapTablePage.setTitle(
          Messages.getString("SapTableWizardPage.TitleUpdate.Step2")); // $NON-NLS-1$
      sapTablePage.setDescription(
          Messages.getString("SapTableWizardPage.DescriptionUpdate.Step2")); // $NON-NLS-1$
      sapTablePage.setPageComplete(isRepositoryObjectEditable());
    }
    addPage(this.propertiesWizardPage);
    addPage(this.sapTablePage);
  }
  @Override
  protected Control createDialogArea(Composite parent) {
    // set the whole page white
    parent.setBackground(new Color(null, new RGB(255, 255, 255)));
    parent.setBackgroundMode(SWT.INHERIT_FORCE);

    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    container.setLayout(layout);

    Composite top = new Composite(container, SWT.NONE);
    top.setLayout(new GridLayout());
    top.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    Label label = new Label(top, SWT.NONE);
    label.setText(REGISTER_TITLE);
    label.setFont(TITLE_FONT);
    label.setForeground(YELLOW_GREEN_COLOR);

    Composite centerComposite = new Composite(container, SWT.NONE);
    centerComposite.setLayout(new GridLayout()); // top.setLayoutData(new
    // GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    centerComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));

    // createSpacer(centerComposite, SWT.NONE);

    IBrandingService brandingService =
        (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    String thanks1 =
        Messages.getString("RegisterWizardPage.legalthanks1", brandingService.getCorporationName());
    String thanks2 =
        Messages.getString("RegisterWizardPage.legalthanks2", brandingService.getCorporationName());
    Font font2 = new Font(null, "Arial", 10, SWT.BOLD);

    Composite c1 = new Composite(centerComposite, SWT.NONE);
    c1.setLayout(new GridLayout());
    c1.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    Label label1 = new Label(c1, SWT.NONE);
    label1.setText(thanks1);
    label1.setFont(font2);

    Composite c2 = new Composite(centerComposite, SWT.NONE);
    c2.setLayout(new GridLayout());
    c2.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    Label label2 = new Label(c2, SWT.NONE);
    label2.setText(thanks2);
    label2.setFont(font2);

    // createSpacer(centerComposite, SWT.NONE);
    createSpacer(centerComposite, SWT.NONE);

    String string =
        Messages.getString("RegisterWizardPage.legalconfirm", brandingService.getCorporationName());
    Composite c3 = new Composite(centerComposite, SWT.NONE);
    c3.setLayout(new GridLayout());
    c3.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    Label label3 = new Label(c3, SWT.NONE);
    label3.setText(string);
    // label3.setFont(font2);
    // createLegalInfos(centerComposite, 1, string2);

    createSpacer(centerComposite, SWT.NONE);

    Composite bottomComposite = new Composite(container, SWT.NONE);
    bottomComposite.setLayout(new GridLayout(3, true));

    bottomComposite.setLayoutData(new GridData());

    new Label(bottomComposite, SWT.NONE);
    // label3.setLayoutData(new GridData());

    new ImageCanvas(bottomComposite, ImageProvider.getImageDesc(ERepositoryImages.REGISTER_ICO));

    return container;
  }
示例#8
0
  public SalesforceSchemaWizard(
      IWorkbench workbench,
      boolean creation,
      RepositoryNode node,
      String[] existingNames,
      boolean isSinglePageOnly) {
    super(workbench, creation);
    this.existingNames = existingNames;
    this.isSinglePageOnly = isSinglePageOnly;
    setNeedsProgressMonitor(true);

    // TODO: should to changed icon.
    setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.DEFAULT_WIZ));
    switch (node.getType()) {
      case SIMPLE_FOLDER:
      case REPOSITORY_ELEMENT:
        pathToSave = RepositoryNodeUtilities.getPath(node);
        break;
      case SYSTEM_FOLDER:
        pathToSave = new Path(""); // $NON-NLS-1$
        break;
    }

    switch (node.getType()) {
      case SIMPLE_FOLDER:
      case SYSTEM_FOLDER:
        connection = ConnectionFactory.eINSTANCE.createSalesforceSchemaConnection();
        connection.setName(ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA.getKey());
        MetadataTable metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();
        IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
        metadataTable.setId(factory.getNextId());
        RecordFile record =
            (RecordFile)
                ConnectionHelper.getPackage(connection.getName(), connection, RecordFile.class);
        if (record != null) { // hywang
          PackageHelper.addMetadataTable(metadataTable, record);
        } else {
          RecordFile newrecord = RecordFactory.eINSTANCE.createRecordFile();
          newrecord.setName(connection.getName());
          ConnectionHelper.addPackage(newrecord, connection);
          PackageHelper.addMetadataTable(metadataTable, newrecord);
        }
        connectionProperty = PropertiesFactory.eINSTANCE.createProperty();
        connectionProperty.setAuthor(
            ((RepositoryContext)
                    CoreRuntimePlugin.getInstance()
                        .getContext()
                        .getProperty(Context.REPOSITORY_CONTEXT_KEY))
                .getUser());
        connectionProperty.setVersion(VersionUtils.DEFAULT_VERSION);
        connectionProperty.setStatusCode(""); // $NON-NLS-1$

        connectionItem = PropertiesFactory.eINSTANCE.createSalesforceSchemaConnectionItem();
        connectionItem.setProperty(connectionProperty);
        connectionItem.setConnection(connection);
        initProxySettings(connection);
        break;

      case REPOSITORY_ELEMENT:
        connection =
            (SalesforceSchemaConnection)
                ((ConnectionItem) node.getObject().getProperty().getItem()).getConnection();
        connectionProperty = node.getObject().getProperty();
        connectionItem = (ConnectionItem) node.getObject().getProperty().getItem();
        // set the repositoryObject, lock and set isRepositoryObjectEditable
        setRepositoryObject(node.getObject());
        isRepositoryObjectEditable();
        initLockStrategy();
        break;
    }
    if (!creation) {
      this.originaleObjectLabel = this.connectionItem.getProperty().getLabel();
      this.originalVersion = this.connectionItem.getProperty().getVersion();
      this.originalDescription = this.connectionItem.getProperty().getDescription();
      this.originalPurpose = this.connectionItem.getProperty().getPurpose();
      this.originalStatus = this.connectionItem.getProperty().getStatusCode();
    }
    initConnection();
  }
 public GenerateJobTriggerAction() {
   super(Messages.GenerateJobXX_GenTJobTrigger);
   setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.PROCESS_ICON));
 }
 public EditJSONPropertiesAction() {
   super();
   this.setText(Messages.EditJSONPropertiesAction_EDIT_PROPERTIES);
   this.setToolTipText(Messages.EditJSONPropertiesAction_EDIT_PROPERTIES);
   this.setImageDescriptor(ImageProvider.getImageDesc(EImage.EDIT_ICON));
 }
 public CreateHCatalogSchemaAction() {
   super();
   setText(CREATE_LABEL);
   setToolTipText(CREATE_LABEL);
   setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.METADATA_TABLE_ICON));
 }
 public ReadCamelProcess() {
   super();
   this.setText(LABEL);
   this.setToolTipText(LABEL);
   this.setImageDescriptor(ImageProvider.getImageDesc(EImage.READ_ICON));
 }