protected ArtifactImportPage(File defaultSourceFile, Artifact defaultDestinationArtifact) { super(PAGE_NAME); selectedArtifactTypes = new ArrayList<>(); selectionLatch = new SelectionLatch(); collector = new RoughArtifactCollector(new RoughArtifact(RoughArtifactKind.PRIMARY)); artifactSelectPanel = new ArtifactSelectPanel(); artifactSelectPanel.setDialogTitle("Select Destination Artifact"); artifactSelectPanel.setDialogMessage( "Select a destination artifact. Imported items will be added as children of the selected artifact."); artifactSelectPanel.setDefaultItem(defaultDestinationArtifact); artifactTypeSelectPanel = new ArtifactTypeSelectPanel(); artifactTypeSelectPanel.setDialogTitle("Import as Artifact Type"); artifactTypeSelectPanel.setDialogMessage( "Select what artifact type data should be imported as."); attributeTypeSelectPanel = new AttributeTypeSelectPanel(); attributeTypeSelectPanel.setDialogTitle("Select Attribute Types"); attributeTypeSelectPanel.setDialogMessage( "Select which attribute types should be used to match imported and existing artifacts."); importContributionManager = new ArtifactExtractorContributionManager(); parserSelectPanel = new ArtifactExtractorSelectPanel(importContributionManager); setTitle("Import artifacts into OSEE"); setDescription("Import artifacts into Define"); setImageDescriptor(ImageManager.getImageDescriptor(FrameworkImage.ARTIFACT_IMPORT_WIZARD)); operationReportMessages = new StringBuilder(); this.defaultSourceFile = defaultSourceFile; }
public static Image getImage(Branch branch) { Image image = null; BranchType branchType = branch.getBranchType(); switch (branchType) { case SYSTEM_ROOT: image = ImageManager.getImage(FrameworkImage.BRANCH_SYSTEM_ROOT); break; case BASELINE: image = ImageManager.getImage(FrameworkImage.BRANCH_BASELINE); break; case WORKING: image = ImageManager.getImage(FrameworkImage.BRANCH_WORKING); break; case MERGE: image = ImageManager.getImage(FrameworkImage.BRANCH_MERGE); break; } return image; }
private static SprintFilteredListDialog createDialog( SprintItems items, Set<IAgileSprint> activeSprints) { SprintFilteredListDialog dialog = new SprintFilteredListDialog("Select Sprint", "Select Sprint", activeSprints); Window.setDefaultImage(ImageManager.getImage(AtsImage.AGILE_SPRINT)); dialog.setInput(activeSprints); if (items.isCommonSelectedSprint() && items.getMultipleSprints().size() == 1) { dialog.setInitialSelections(Arrays.asList(items.getMultipleSprints().iterator().next())); } return dialog; }
@Override public Image getColumnImage(Object element, XViewerColumn xCol, int columnIndex) { if (element instanceof MessageCoverageItem && xCol.equals(CoverageXViewerFactory.Name)) { return ImageManager.getImage(FrameworkImage.X_RED); } if (element instanceof MessageCoverageItem) { return null; } ICoverage coverageItem = (ICoverage) element; if (xCol.equals(CoverageXViewerFactory.Assignees_Col)) { return getCoverageItemUserImage(coverageItem); } if (xCol.equals(CoverageXViewerFactory.Name)) { return ImageManager.getImage(coverageItem.getOseeImage()); } if (xCol.equals(CoverageXViewerFactory.Work_Product_Task)) { if (Strings.isValid(coverageItem.getWorkProductTaskStr())) { return ImageManager.getImage(ServiceProvider.getOseeCmService().getImage(ImageType.Task)); } } return null; }
private void createConfigurationToolBar(CoolBar coolBar) { CoolItem configCoolItem = new CoolItem(coolBar, SWT.NONE); ToolBar configToolBar = new ToolBar(coolBar, SWT.FLAT | SWT.HORIZONTAL); saveWidget = new SaveWidget(this); saveWidget.createToolItem(configToolBar); loadWidget = new LoadWidget(this); loadWidget.createToolItem(configToolBar); deleteButton = new ToolItem(configToolBar, SWT.PUSH | SWT.CENTER); deleteButton.setImage(ImageManager.getImage(OteTestManagerImage.FILE_DELETE)); deleteButton.setToolTipText("Deletes Selected (highlighted) Scripts"); deleteButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleDeleteButton(); } }); deleteButton.addListener( SWT.MouseUp, new Listener() { @Override public void handleEvent(Event e) { if (e.button == 3) { handleDeleteButton(); } } }); configToolBar.pack(); Point size = configToolBar.getSize(); configCoolItem.setControl(configToolBar); configCoolItem.setSize(configCoolItem.computeSize(size.x, size.y)); configCoolItem.setMinimumSize(size); }
@Override protected Image getEnabledImage() { return ImageManager.getImage(FrameworkImage.EXCLAIM_RED); }
@Override public ImageDescriptor getImageDescriptor() { return ImageManager.getImageDescriptor(FrameworkImage.ARTIFACT_EDITOR); }
public OpenVersionArtifactAction(AbstractWorkflowArtifact sma) { super(ACTION_TEXT, ImageManager.getImageDescriptor(FrameworkImage.VERSION)); setToolTipText(ACTION_TEXT); this.sma = sma; }
private void createControlsToolBar(CoolBar coolBar) { CoolItem controlsCoolItem = new CoolItem(coolBar, SWT.NONE); ToolBar controlsToolBar = new ToolBar(coolBar, SWT.FLAT | SWT.HORIZONTAL); runButton = new ToolItem(controlsToolBar, SWT.PUSH | SWT.CENTER); runButton.setImage(ImageManager.getImage(OteTestManagerImage.SEL_RUN_EXEC)); runButton.setDisabledImage(ImageManager.getImage(OteTestManagerImage.UNSEL_RUN_EXEC)); runButton.setToolTipText("Runs the Checked Scripts"); runButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleRunButton(); } }); runButton.addListener( SWT.MouseUp, new Listener() { @Override public void handleEvent(Event e) { if (e.button == 3) { handleRunButton(); } } }); runButton.setEnabled(false); // Create and configure the "Abort" button abortButton = new ToolItem(controlsToolBar, SWT.PUSH | SWT.CENTER); abortButton.setImage(ImageManager.getImage(OteTestManagerImage.SEL_ABORT_STOP)); abortButton.setDisabledImage(ImageManager.getImage(OteTestManagerImage.UNSEL_ABORT_STOP)); abortButton.setToolTipText("Abort Currently Running Script"); abortButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleAbortButton(); abortBatchButton.setEnabled(false); abortButton.setEnabled(false); Timer timer = new Timer(); timer.schedule(new EnabledAbortsTimer(), 30000); } }); abortButton.addListener( SWT.MouseUp, new Listener() { @Override public void handleEvent(Event e) { if (e.button == 3) { handleAbortButton(); abortBatchButton.setEnabled(false); abortButton.setEnabled(false); Timer timer = new Timer(); timer.schedule(new EnabledAbortsTimer(), 30000); } } }); abortButton.setEnabled(false); abortBatchButton = new ToolItem(controlsToolBar, SWT.PUSH | SWT.CENTER); abortBatchButton.setImage(ImageManager.getImage(OteTestManagerImage.SEL_BATCH_ABORT_STOP)); abortBatchButton.setDisabledImage( ImageManager.getImage(OteTestManagerImage.UNSEL_BATCH_ABORT_STOP)); abortBatchButton.setToolTipText("Abort Script Batch"); abortBatchButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleBatchAbortButton(); abortBatchButton.setEnabled(false); abortButton.setEnabled(false); Timer timer = new Timer(); timer.schedule(new EnabledAbortsTimer(), 30000); } }); abortBatchButton.addListener( SWT.MouseUp, new Listener() { @Override public void handleEvent(Event e) { if (e.button == 3) { handleBatchAbortButton(); abortBatchButton.setEnabled(false); abortButton.setEnabled(false); Timer timer = new Timer(); timer.schedule(new EnabledAbortsTimer(), 30000); } } }); abortBatchButton.setEnabled(false); controlsToolBar.pack(); Point size = controlsToolBar.getSize(); controlsCoolItem.setControl(controlsToolBar); controlsCoolItem.setSize(controlsCoolItem.computeSize(size.x, size.y)); controlsCoolItem.setMinimumSize(size); }
@Override public ImageDescriptor getCommandImageDescriptor(Command command, Artifact artifact) { return ImageManager.getImageDescriptor(CoverageImage.COVERAGE_PACKAGE); }
@Override public ImageDescriptor getImageDescriptor() { return ImageManager.getImageDescriptor(FrameworkImage.REPORT); }