There are 80 code examples for org.eclipse.swt.widgets.Shell.

The API names are highlighted below. You can use suckoo button to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.

Project Name: CodeAnalyzer Package: de.fzi.cloneanalyzer.core

Source Code: CloneAnalyzerPlugin.java (Click to view .java file)

Method Code:
vote
like

/** 
 * starts the whole analyzation process <br>
 * to do this, a separate thread is started that concurrently displays the
 * state of the analyzation, using a progress bar.
 */
public void runAnalyzer(){
  try {
    prepareUI();
    ProgressMonitorDialog pmd=new ProgressMonitorDialog(shell);
    IRunnableWithProgress op=new MyRunnableWithProgress();
    pmd.run(true,true,op);
    update();
  }
 catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
catch (  InterruptedException e) {
    EclipseUtil.warning(e.getMessage() + "\naborted operation!");
  }
}
 

Project Name: CodeAnalyzer Package: de.fzi.cloneanalyzer.viewer

Source Code: CloneComparisonDialog.java (Click to view .java file)

Method Code:
vote
like

protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText("Compare Clone Files");
}
 

Project Name: OpenII Package: org.mitre.openii.application

Source Code: OpenIIApplication.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Define the images for this application 
 */
public void createWindowContents(Shell shell){
  super.createWindowContents(shell);
  shell.setImage(OpenIIActivator.getImage("OpenII.gif"));
  Window.setDefaultImage(OpenIIActivator.getImage("OpenII.gif"));
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.mappings

Source Code: ExportMappingDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Function for exporting the specified mapping 
 */
static public void export(Shell shell,Mapping mapping){
  Schema source=OpenIIManager.getSchema(mapping.getSourceId());
  Schema target=OpenIIManager.getSchema(mapping.getTargetId());
  ExporterDialog dialog=new ExporterDialog(shell,source.getName() + " to " + target.getName(),PorterType.MAPPING_EXPORTERS);
  String filename=dialog.open();
  if (filename != null) {
    try {
      MappingExporter exporter=dialog.getExporter();
      exporter.exportMapping(mapping,OpenIIManager.getMappingCells(mapping.getId()),new File(filename));
    }
 catch (    Exception e) {
      MessageBox message=new MessageBox(shell,SWT.ERROR);
      message.setText("Mapping Export Error");
      message.setMessage("Failed to export mapping. " + e.getMessage());
      message.open();
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.mappings

Source Code: DeleteMappingDialog.java (Click to view .java file)

Method Code:
vote
like

static public void delete(Shell shell,Mapping mapping){
  String source=OpenIIManager.getSchema(mapping.getSourceId()).getName();
  String target=OpenIIManager.getSchema(mapping.getTargetId()).getName();
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Delete","Are you sure you want to delete mapping between '" + source + "' and '"+ target+ "'?");
  if (confirmed) {
    boolean success=OpenIIManager.deleteMapping(mapping.getId());
    if (!success)     MessageDialog.openError(shell,"Deletion Failure","The mapping failed to be properly deleted");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.mappings.importer

Source Code: ImportMappingDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setText("Import Mapping");
  setTitleImage(OpenIIActivator.getImage("ImportLarge.png"));
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects

Source Code: BatchMatchDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  setTitleImage(OpenIIActivator.getImage("BatchMatch.gif"));
  shell.setText("Batch Generate Mappings");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects

Source Code: EditProjectDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Project.gif"));
  shell.setText((project == null ? "Create" : "Edit") + " Project");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects

Source Code: ReplaceSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Schema.gif"));
  shell.setText("Replace Schema");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects

Source Code: MergeProjectsDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Mapping.gif"));
  shell.setText("Merge Projects");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects

Source Code: DeleteProjectDialog.java (Click to view .java file)

Method Code:
vote
like

static public void delete(Shell shell,Project project){
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Delete","Are you sure you want to delete project '" + project.getName() + "'?");
  if (confirmed) {
    boolean success=OpenIIManager.deleteProject(project.getId());
    if (!success)     MessageDialog.openError(shell,"Deletion Failure","The project failed to be properly deleted");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects

Source Code: ExportProjectDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Function for exporting the specified project 
 */
static public void export(Shell shell,Project project){
  ExporterDialog dialog=new ExporterDialog(shell,project.getName(),PorterType.PROJECT_EXPORTERS);
  String filename=dialog.open();
  if (filename != null) {
    try {
      HashMap<Mapping,ArrayList<MappingCell>> mappings=new HashMap<Mapping,ArrayList<MappingCell>>();
      for (      Mapping mapping : OpenIIManager.getMappings(project.getId()))       mappings.put(mapping,OpenIIManager.getMappingCells(mapping.getId()));
      ProjectExporter exporter=dialog.getExporter();
      exporter.exportProject(project,mappings,new File(filename));
    }
 catch (    Exception e) {
      MessageBox message=new MessageBox(shell,SWT.ERROR);
      message.setText("Project Export Error");
      message.setMessage("Failed to export project. " + e.getMessage());
      message.open();
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects.importer

Source Code: ImportProjectDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setText("Import Project");
  setTitleImage(OpenIIActivator.getImage("ImportLarge.png"));
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects.unity

Source Code: GenerateVocabularyDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setText("Generate Vocabulary");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.projects.unity

Source Code: ProgressBarDialog.java (Click to view .java file)

Method Code:
vote
like

synchronized protected void createContents(){
  shell=new Shell(getParent(),SWT.TITLE | SWT.PRIMARY_MODAL);
  shell.setText(shellTitle);
  final GridLayout gridLayout=new GridLayout();
  gridLayout.verticalSpacing=10;
  shell.setLayout(gridLayout);
  shell.setSize(483,181);
  final Composite composite=new Composite(shell,SWT.NONE);
  composite.setLayoutData(new GridData(GridData.FILL,GridData.CENTER,true,false));
  composite.setLayout(new GridLayout());
  message=new CLabel(composite,SWT.NONE);
  message.setLayoutData(new GridData(GridData.FILL,GridData.CENTER,true,false));
  message.setText(processMessage);
  progressBarComposite=new Composite(shell,SWT.NONE);
  progressBarComposite.setLayoutData(new GridData(GridData.FILL,GridData.CENTER,false,false));
  progressBarComposite.setLayout(new FillLayout());
  progressBar=new ProgressBar(progressBarComposite,processBarStyle);
  progressBar.setMaximum(100);
  processMessageLabel=new Label(shell,SWT.NONE);
  processMessageLabel.setLayoutData(new GridData(GridData.FILL,GridData.CENTER,false,false));
  cancelComposite=new Composite(shell,SWT.NONE);
  cancelComposite.setLayoutData(new GridData(GridData.END,GridData.CENTER,false,false));
  final GridLayout gridLayout_1=new GridLayout();
  gridLayout_1.numColumns=2;
  cancelComposite.setLayout(gridLayout_1);
  cancelButton=new Button(cancelComposite,SWT.NONE);
  cancelButton.setLayoutData(new GridData(78,SWT.DEFAULT));
  cancelButton.setText("Cancel");
  cancelButton.setEnabled(mayCancel);
  cancelButton.addListener(SWT.Selection,new Listener(){
    synchronized public void handleEvent(    Event arg0){
      System.err.println("Cancel key pressed.");
      killDialog();
    }
  }
);
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: ExportSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Function for exporting the specified schema 
 */
static public void export(Shell shell,Schema schema){
  ExporterDialog dialog=new ExporterDialog(shell,schema.getName(),PorterType.SCHEMA_EXPORTERS);
  String filename=dialog.open();
  if (filename != null) {
    try {
      SchemaExporter exporter=dialog.getExporter();
      SchemaInfo schemaInfo=OpenIIManager.getSchemaInfo(schema.getId());
      exporter.exportSchema(schema,schemaInfo.getElements(null),new File(filename));
    }
 catch (    Exception e) {
      MessageBox message=new MessageBox(shell,SWT.ERROR);
      message.setText("Schema Export Error");
      message.setMessage("Failed to export schema. " + e.getMessage());
      message.open();
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: EditSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Schema.gif"));
  shell.setText("Edit Schema Properties");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: ExtendSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setText("Extend Schema");
  setTitleImage(OpenIIActivator.getImage("ExtendLarge.png"));
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: ExportSchemasDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Function for exporting the schema under the specified tag 
 */
static public void export(Shell shell,Tag tag){
  DirectoryDialog dialog=new DirectoryDialog(shell);
  dialog.setFilterPath(OpenIIManager.getActiveDir());
  dialog.setText("Export Schemas");
  String filename=dialog.open();
  OpenIIManager.setActiveDir(dialog.getFilterPath());
  File directory=new File(filename);
  for (  Integer schemaID : OpenIIManager.getTagSchemas(tag.getId())) {
    Schema schema=OpenIIManager.getSchema(schemaID);
    String schemaName=schema.getName().replace("/","_");
    ArrayList<SchemaElement> elements=OpenIIManager.getSchemaInfo(schemaID).getElements(null);
    int i=0;
    File file=new File(directory,schemaName + ".m3s");
    while (file.exists())     file=new File(directory,schemaName + "(" + (++i)+ ").m3s");
    try {
      PorterManager manager=new PorterManager(RepositoryManager.getClient());
      M3SchemaExporter exporter=(M3SchemaExporter)manager.getPorter(M3SchemaExporter.class);
      exporter.exportSchema(schema,elements,file);
    }
 catch (    Exception e) {
      MessageBox message=new MessageBox(shell,SWT.ERROR);
      message.setText("Schema Export Error");
      message.setMessage("Failed to export schema " + schema.getName() + ". "+ e.getMessage());
      message.open();
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: DeleteDataSourceDialog.java (Click to view .java file)

Method Code:
vote
like

static public void delete(Shell shell,DataSource dataSource){
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Delete","Are you sure you want to delete data source '" + dataSource.getName() + "'?");
  if (confirmed) {
    boolean success=OpenIIManager.deleteDataSource(dataSource.getId());
    if (!success)     MessageDialog.openError(shell,"Deletion Failure","The data source failed to be properly deleted");
    Repository selectedRepository=RepositoryManager.getSelectedRepository();
    try {
      DeleteDatabaseClient d=new DeleteDatabaseClient(dataSource.getName(),selectedRepository);
      boolean deleteDatabaseSuccess=d.deleteInstanceDatabase();
      if (!deleteDatabaseSuccess)       MessageDialog.openError(shell,"Deletion Failure","The data source failed to be properly deleted");
    }
 catch (    NoDataFoundException e) {
      System.out.println("----Application Terminated----");
      System.out.println(e.getMessage());
    }
catch (    RemoteException e) {
      System.out.println("----Application Terminated----");
      System.out.println(e.getMessage());
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: DeleteSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

static public void delete(Shell shell,Schema schema){
  String label=schema.getClass().getName().replaceAll(".*\\.","").toLowerCase();
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Delete","Are you sure you want to delete " + label + " '"+ schema.getName()+ "'?");
  if (confirmed) {
    boolean success=OpenIIManager.deleteSchema(schema.getId());
    if (!success)     MessageDialog.openError(shell,"Deletion Failure","The " + label + " failed to be properly deleted");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas

Source Code: CreateDataSourceDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setText("Create Instance Database");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.schemas.importer

Source Code: ImportSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setText("Import Schema");
  setTitleImage(OpenIIActivator.getImage("ImportLarge.png"));
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.tags

Source Code: EditTagDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("SchemaGroup.gif"));
  shell.setText((tag == null ? "Create" : "Edit") + " Tag");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.tags

Source Code: SearchDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Search.gif"));
  shell.setText("Search");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.tags

Source Code: DeleteTagDialog.java (Click to view .java file)

Method Code:
vote
like

static public void delete(Shell shell,Tag tag){
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Delete","Are you sure you want to delete group '" + tag.getName() + "' and all subgroups?");
  if (confirmed) {
    boolean success=OpenIIManager.deleteTag(tag.getId());
    if (!success)     MessageDialog.openError(shell,"Deletion Failure","The group failed to be properly deleted");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.thesauri

Source Code: ExportThesaurusDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Function for exporting the specified schema 
 */
static public void export(Shell shell,Schema schema){
  ExporterDialog dialog=new ExporterDialog(shell,schema.getName(),PorterType.THESAURUS_EXPORTERS);
  String filename=dialog.open();
  if (filename != null) {
    try {
      SchemaExporter exporter=dialog.getExporter();
      SchemaInfo schemaInfo=OpenIIManager.getSchemaInfo(schema.getId());
      exporter.exportSchema(schema,schemaInfo.getElements(null),new File(filename));
    }
 catch (    Exception e) {
      MessageBox message=new MessageBox(shell,SWT.ERROR);
      message.setText("Thesaurus Export Error");
      message.setMessage("Failed to export thesaurus. " + e.getMessage());
      message.open();
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.thesauri

Source Code: EditThesaurusDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Thesaurus.gif"));
  shell.setText("Edit Thesaurus Properties");
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.vocabulary

Source Code: DeleteVocabularyDialog.java (Click to view .java file)

Method Code:
vote
like

static public void delete(Shell shell,VocabularyInProject vocabulary){
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Delete","Are you sure you want to delete vocabulary?");
  if (confirmed) {
    boolean success=OpenIIManager.deleteVocabulary(vocabulary.getProjectID());
    if (!success)     MessageDialog.openError(shell,"Deletion Failure","The vocabulary failed to be properly deleted");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.vocabulary

Source Code: GenerateThesaurusDialog.java (Click to view .java file)

Method Code:
vote
like

static public void generate(Shell shell,VocabularyInProject vocabularyInProject){
  Integer projectID=vocabularyInProject.getProjectID();
  VocabularyTerms vocabTerms=OpenIIManager.getVocabularyTerms(projectID);
  EditThesaurusDialog dialog=new EditThesaurusDialog(shell,null);
  dialog.open();
  if (dialog.getReturnCode() == IDialogConstants.CANCEL_ID)   return;
  Thesaurus thesaurus=dialog.getThesaurus();
  ThesaurusTerms terms=new ThesaurusTerms(null,vocabTerms.getTerms());
  terms.setThesaurusId(thesaurus.getId());
  if (!OpenIIManager.saveThesaurusTerms(terms)) {
    OpenIIManager.deleteThesaurus(thesaurus.getId());
    MessageDialog.openError(shell,"Generation Failure","The thesaurus failed to be properly generated");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.dialogs.vocabulary

Source Code: ExportVocabularyDialog.java (Click to view .java file)

Method Code:
vote
like

public static void export(Shell shell,VocabularyInProject vocabularyInProject){
  VocabularyTerms terms=OpenIIManager.getVocabularyTerms(vocabularyInProject.getProjectID());
  Project project=OpenIIManager.getProject(terms.getProjectID());
  ExporterDialog dialog=new ExporterDialog(shell,project.getName() + " vocabulary",PorterType.VOCABULARY_EXPORTERS);
  String filename=dialog.open();
  if (filename != null) {
    try {
      VocabularyExporter exporter=dialog.getExporter();
      exporter.exportVocabulary(terms,new File(filename));
    }
 catch (    Exception e) {
      MessageBox message=new MessageBox(shell,SWT.ERROR);
      message.setText("Vocabulary Export Error");
      message.setMessage("Failed to export vocabulary. " + e.getMessage());
      message.open();
    }
  }
}
 

Project Name: OpenII Package: org.mitre.openii.editors.search

Source Code: SearchView.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Saves the search results as a tagged group 
 */
public void widgetSelected(SelectionEvent e){
  Shell shell=getSite().getWorkbenchWindow().getShell();
  EditTagDialog dlg=new EditTagDialog(shell,null,null,new ArrayList<Integer>(schemaIDs));
  dlg.open();
}
 

Project Name: OpenII Package: org.mitre.openii.editors.tags

Source Code: AffinityEditor.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Handles the selection of a group of schemas or cluster 
 */
public void selectionClicked(SelectionClickedEvent<Integer> event){
  if (event.selectedClusterObjects != null) {
    selectedCluster=new ClusterGroup<Integer>();
    selectedCluster.addClusterObjects(selectedSchemas);
    if (event.selectedClusterObjects.size() == 1) {
      if (event.button == 1 && event.clickCount == 2)       EditorManager.launchDefaultEditor(schemaManager.getSchema(event.selectedClusterObjects.iterator().next()));
    }
 else     if (event.button == 3 || (event.button == 1 && event.controlDown)) {
      selectedSchemas=event.selectedClusterObjects;
      affinityMenu.setVisible(true);
    }
  }
 else   if (event.selectedClusters != null && event.selectedClusters.size() == 1) {
    selectedCluster=event.selectedClusters.iterator().next();
    selectedSchemas=selectedCluster.getObjectIDs();
    if (event.button == 1 && event.clickCount == 2) {
      Shell shell=getSite().getWorkbenchWindow().getShell();
      SchemaClusterDetailsDlg dlg=new SchemaClusterDetailsDlg(shell,SWT.APPLICATION_MODAL,affinityModel,selectedCluster);
      dlg.setVisible(true);
    }
 else     if (event.button == 3 || (event.button == 1 && event.controlDown))     affinityMenu.setVisible(true);
  }
}
 

Project Name: OpenII Package: org.mitre.openii.views.repositories

Source Code: DisconnectRepositoryDialog.java (Click to view .java file)

Method Code:
vote
like

static public void disconnect(Shell shell,Repository repository){
  boolean confirmed=MessageDialog.openConfirm(shell,"Confirm Disconnection","Are you sure you want to disconnect repository '" + repository.getName() + "'?");
  if (confirmed)   RepositoryManager.disconnectRepository(repository);
}
 

Project Name: OpenII Package: org.mitre.openii.views.repositories

Source Code: RepositoryAction.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Runs the specified Manager action 
 */
public void run(){
  Shell shell=menuManager.getMenu().getShell();
  if (actionType == ADD_REPOSITORY)   new EditRepositoryDialog(shell,null).open();
  if (actionType == EDIT_REPOSITORY)   new EditRepositoryDialog(shell,menuManager.getRepository()).open();
  if (actionType == DISCONNECT_REPOSITORY)   DisconnectRepositoryDialog.disconnect(shell,menuManager.getRepository());
  if (actionType == COMPRESS_REPOSITORY) {
    boolean success=false;
    try {
      success=RepositoryManager.getClient().compress();
    }
 catch (    Exception e) {
    }
    if (success)     MessageDialog.openConfirm(shell,"Repository Compression","The repository was successfully compressed!");
 else     MessageDialog.openError(shell,"Repository Compression Failure","The repository failed to be compressed!");
  }
}
 

Project Name: OpenII Package: org.mitre.openii.views.repositories

Source Code: EditRepositoryDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Repository.gif"));
  shell.setText((repository == null ? "Create" : "Edit") + " Repository");
}
 

Project Name: OpenII Package: org.mitre.openii.widgets.mappingList

Source Code: AddMappingsToListDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Mapping.gif"));
  shell.setText("Add Mapping");
}
 

Project Name: OpenII Package: org.mitre.openii.widgets.matchers

Source Code: EditMatcherParametersDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("SchemaGroup.gif"));
  shell.setText("Edit Parameters");
}
 

Project Name: OpenII Package: org.mitre.openii.widgets.porters

Source Code: ExporterDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Constructs the Exporter dialog 
 */
public ExporterDialog(Shell shell,String filename,PorterType exporterType){
  this.exporterType=exporterType;
  dialog=new FileDialog(shell,SWT.SAVE);
  String label=exporterType.name().replaceAll("_EXPORTERS","").toLowerCase();
  label=label.substring(0,1).toUpperCase() + label.substring(1,label.length());
  dialog.setText("Export " + label);
  dialog.setFileName(filename);
  dialog.setFilterPath(OpenIIManager.getActiveDir());
  PorterManager manager=new PorterManager(RepositoryManager.getClient());
  exporters=manager.getPorters(exporterType);
  ArrayList<String> names=new ArrayList<String>();
  ArrayList<String> extensions=new ArrayList<String>();
  for (  Exporter exporter : exporters) {
    names.add(exporter.getName() + " (" + exporter.getFileType()+ ")");
    extensions.add("*" + exporter.getFileType());
  }
  dialog.setFilterNames(names.toArray(new String[0]));
  dialog.setFilterExtensions(extensions.toArray(new String[0]));
  Class<?> exporterClass=OpenIIManager.getPorterPreference(exporterType);
  for (int i=0; i < exporters.size(); i++)   if (exporters.get(i).getClass().equals(exporterClass))   dialog.setFilterIndex(i);
}
 

Project Name: OpenII Package: org.mitre.openii.widgets.schemaList

Source Code: AddSchemasToListDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Schema.gif"));
  shell.setText("Schema Selection");
}
 

Project Name: OpenII Package: org.mitre.openii.widgets.schemaList

Source Code: EditProjectSchemaDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Schema.gif"));
  shell.setText("Edit Project Schema");
}
 

Project Name: OpenII Package: org.mitre.openii.widgets.schemaTree

Source Code: SchemaTreeDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Configures the dialog shell 
 */
protected void configureShell(Shell shell){
  super.configureShell(shell);
  shell.setImage(OpenIIActivator.getImage("Schema.gif"));
  shell.setText("Select Schema Element");
}
 

Project Name: codecover Package: org.codecover.eclipse.views

Source Code: CreateErrorInfoFileDialog.java (Click to view .java file)

Method Code:
vote
like

private void outputErrorInfoFile(){
  boolean relevant=false;
  for (  ClassRating cr : this.classRatings) {
    if (cr.rating > 0) {
      relevant=true;
    }
  }
  if (relevant) {
    FileDialog fg=new FileDialog(shell,SWT.SAVE);
    fg.setOverwrite(true);
    fg.setFilterExtensions(new String[]{"xml"});
    fg.setText("Zieldatei auswählen...");
    String file=fg.open();
    File selectedFile=null;
    if (file != null && file.length() > 2) {
      selectedFile=new File(file);
    }
    try {
      if (selectedFile != null && ((selectedFile.exists() && selectedFile.canWrite()) || selectedFile.createNewFile())) {
        StringBuilder sb=new StringBuilder();
        sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<errorIndicator>\n");
        for (        ClassRating cr : this.classRatings) {
          if (cr.rating > 0) {
            sb.append("\t<file class=\"" + cr.clazz + "\" value=\""+ cr.rating+ "\" />\n");
          }
        }
        sb.append("</errorIndicator>\n");
        if (selectedFile.exists()) {
          selectedFile.delete();
        }
        selectedFile.createNewFile();
        FileWriter writer=new FileWriter(selectedFile);
        writer.append(sb.toString());
        writer.close();
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
 

Project Name: codecover Package: org.codecover.eclipse.views

Source Code: TestSessionsView.java (Click to view .java file)

Method Code:
vote
like

@Override public void run(){
  ISelection sel=this.viewer.getSelection();
  if (!(sel instanceof IStructuredSelection) || ((IStructuredSelection)sel).isEmpty()) {
    return;
  }
  Object selectedObject=((IStructuredSelection)sel).getFirstElement();
  (new TestElementPropertiesDialog(this.shell,selectedObject,TestSessionsView.this.getVisTSCInfo(),TestSessionsView.this.logger)).open();
}
 

Project Name: codecover Package: org.codecover.eclipse.views

Source Code: ManualRedundancyView.java (Click to view .java file)

Method Code:
vote
like

@Override public void run(){
  ISelection sel=this.viewer.getSelection();
  if (!(sel instanceof IStructuredSelection) || ((IStructuredSelection)sel).isEmpty()) {
    return;
  }
  Object selectedObject=((IStructuredSelection)sel).getFirstElement();
  (new TestElementPropertiesDialog(this.shell,selectedObject,ManualRedundancyView.this.getVisTSCInfo(),ManualRedundancyView.this.logger)).open();
}
 

Project Name: codecover Package: org.codecover.eclipse.views.controls

Source Code: DeleteTestElementsConfirmDialog.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Constructs a dialog which asks the user to confirm a deletion of test
 * elements.
 * @param shell     the parent shell
 * @param selection the test elements the user selected for deletion
 */
public DeleteTestElementsConfirmDialog(Shell shell,Object[] selection){
  super(shell,TITLE,null,MSG,MessageDialog.QUESTION,new String[]{IDialogConstants.YES_LABEL,IDialogConstants.NO_LABEL},1);
  this.selection=selection;
  this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
}
 

Project Name: codecover Package: org.codecover.eclipse.views.controls

Source Code: TestElementPropertiesDialog.java (Click to view .java file)

Method Code:
vote
like

@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  if (this.testElement instanceof TestCase) {
    newShell.setText(TITLE_TEST_CASE);
  }
 else {
    newShell.setText(TITLE_TEST_SESSION);
  }
}
 

Project Name: codecover Package: org.codecover.eclipse.views.controls

Source Code: DeleteTSCsSelectDialog.java (Click to view .java file)

Method Code:
vote
like

@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(TITLE);
}
 

Project Name: codecover Package: org.codecover.eclipse.views.controls

Source Code: DeleteTestElementsSelectDialog.java (Click to view .java file)

Method Code:
vote
like

@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(TITLE);
}
 

Project Name: codecover Package: org.codecover.eclipse.views.controls

Source Code: DeleteTSCsConfirmDialog.java (Click to view .java file)

Method Code:
vote
like

DeleteTSCsConfirmDialog(Shell shell,List<TSContainerInfo> selection){
  super(shell,TITLE,null,MESSAGE,MessageDialog.QUESTION,new String[]{IDialogConstants.YES_LABEL,IDialogConstants.NO_LABEL},1);
  this.selection=selection;
  this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
}
 

Project Name: csvedit.plugin Package: org.fhsolution.eclipse.plugins.csvedit.page

Source Code: DeleteColumnPage.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
 */
protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText("Delete Column");
}
 

Project Name: csvedit.plugin Package: org.fhsolution.eclipse.plugins.csvedit.page

Source Code: InsertColumnPage.java (Click to view .java file)

Method Code:
vote
like

protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText("Insert Column");
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: Controller.java (Click to view .java file)

Method Code:
vote
like

public void run(){
  if (!shouldProceedReloading(monitor,bookmark))   return;
  if (!isSynchronizedFeed) {
    try {
      URI normalizedUri=URIUtils.normalizeUri(feedLink,true);
      if (Owl.getConnectionService().getAuthCredentials(normalizedUri,authEx.getRealm()) != null) {
        reloadQueued(bookmark,null,shellAr[0]);
        return;
      }
    }
 catch (    CredentialsException exe) {
      Activator.getDefault().getLog().log(exe.getStatus());
    }
  }
  int status=-1;
  if (isSynchronizedFeed)   status=OwlUI.openSyncLogin(shellAr[0]);
 else   status=new LoginDialog(shellAr[0],feedLink,authEx.getRealm()).open();
  if (status == Window.CANCEL && isSynchronizedFeed)   fLastGoogleLoginCancel.set(System.currentTimeMillis());
  if (status == Window.OK && shouldProceedReloading(monitor,bookmark)) {
    if (StringUtils.isSet(authEx.getRealm())) {
      bookmark.setProperty(BM_REALM_PROPERTY,authEx.getRealm());
      fBookMarkDAO.save(bookmark);
    }
    reloadQueued(bookmark,null,shellAr[0]);
  }
 else   if (shouldProceedReloading(monitor,bookmark) && !bookmark.isErrorLoading()) {
    updateErrorLoading(bookmark,authEx);
  }
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: Controller.java (Click to view .java file)

Method Code:
vote
like

private boolean openWarningConfirm(Shell parent,String title,String message){
  MessageDialog dialog=new MessageDialog(parent,title,null,message,MessageDialog.WARNING,new String[]{IDialogConstants.OK_LABEL,IDialogConstants.CANCEL_LABEL},0);
  return dialog.open() == 0;
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: DefaultPasswordProvider.java (Click to view .java file)

Method Code:
vote
like

@Override public PBEKeySpec getPassword(IPreferencesContainer container,final int passwordType){
  if (!PlatformUI.isWorkbenchRunning())   return null;
  final PBEKeySpec[] spec=new PBEKeySpec[1];
  final Shell activeShell=OwlUI.getActiveShell();
  JobRunner.runSyncedInUIThread(activeShell,new Runnable(){
    public void run(){
      MasterPasswordDialog dialog=new MasterPasswordDialog(activeShell,passwordType);
      if (dialog.open() == IDialogConstants.OK_ID) {
        String masterPassword=dialog.getMasterPassword();
        String internalPassword;
        try {
          MessageDigest digest=MessageDigest.getInstance(DIGEST_ALGORITHM);
          byte[] digested=digest.digest(masterPassword.getBytes());
          internalPassword=EncodingUtils.encodeBase64(digested);
        }
 catch (        NoSuchAlgorithmException e) {
          Activator.safeLogError(e.getMessage(),e);
          internalPassword=masterPassword;
        }
        spec[0]=new PBEKeySpec(internalPassword.toCharArray());
      }
    }
  }
);
  return spec[0];
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: DefaultPasswordProvider.java (Click to view .java file)

Method Code:
vote
like

public void run(){
  MasterPasswordDialog dialog=new MasterPasswordDialog(activeShell,passwordType);
  if (dialog.open() == IDialogConstants.OK_ID) {
    String masterPassword=dialog.getMasterPassword();
    String internalPassword;
    try {
      MessageDigest digest=MessageDigest.getInstance(DIGEST_ALGORITHM);
      byte[] digested=digest.digest(masterPassword.getBytes());
      internalPassword=EncodingUtils.encodeBase64(digested);
    }
 catch (    NoSuchAlgorithmException e) {
      Activator.safeLogError(e.getMessage(),e);
      internalPassword=masterPassword;
    }
    spec[0]=new PBEKeySpec(internalPassword.toCharArray());
  }
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: OwlUI.java (Click to view .java file)

Method Code:
vote
like

/** 
 * Opens the Login Dialog to authenticate against sync services.
 * @param shell the {@link Shell} as parent of the dialog or <code>null</code>
 * if none.
 * @return one of the {@link IDialogConstants} depending on the users choice
 * of closing the dialog with OK or Cancel.
 */
public static int openSyncLogin(Shell shell){
  if (shell == null)   shell=getActiveShell();
  if (shell != null) {
    URI googleLoginUri=URI.create(SyncUtils.GOOGLE_LOGIN_URL);
    LoginDialog dialog=new LoginDialog(shell,googleLoginUri,null,true);
    dialog.setHeader(Messages.OwlUI_SYNC_LOGIN);
    dialog.setSubline(Messages.OwlUI_SYNC_LOGIN_TEXT);
    dialog.setTitleImageDescriptor(OwlUI.getImageDescriptor("icons/wizban/reader_wiz.png"));
    return dialog.open();
  }
  return IDialogConstants.CANCEL_ID;
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: SplashHandler.java (Click to view .java file)

Method Code:
vote
like

private void initComponents(Shell shell){
  shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
  Composite container=new Composite(shell,SWT.NONE);
  container.setLayout(LayoutUtils.createGridLayout(1,30,12));
  container.setLocation(0,240);
  container.setSize(400,60);
  fBar=new ProgressBar(container,SWT.HORIZONTAL);
  fBar.setLayoutData(new GridData(SWT.FILL,SWT.BEGINNING,true,false));
  ((GridData)fBar.getLayoutData()).heightHint=12;
  fBar.setMaximum(100);
  fBar.setSelection(25);
  Label versionLabel=new Label(container,SWT.NONE);
  versionLabel.setLayoutData(new GridData(SWT.END,SWT.BEGINNING,true,false));
  versionLabel.setFont(fVersionFont);
  versionLabel.setForeground(fVersionColor);
  versionLabel.setText(NLS.bind(Messages.SplashHandler_BUILD,"2.1"));
  shell.layout(true,true);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: Application.java (Click to view .java file)

Method Code:
vote
like

private void handleLinkSupplied(final String link){
  final Shell shell=OwlUI.getPrimaryShell();
  if (shell == null)   return;
  final String normalizedLink;
  if (link.startsWith(URIUtils.FEED_IDENTIFIER + URIUtils.HTTPS))   normalizedLink=URIUtils.HTTPS + link.substring((URIUtils.FEED_IDENTIFIER + URIUtils.HTTPS).length());
 else   normalizedLink=link;
  final IBookMark existingBookMark=getBookMark(normalizedLink);
  JobRunner.runInUIThread(shell,new Runnable(){
    public void run(){
      if (existingBookMark == null) {
        new NewBookMarkAction(shell,null,null,normalizedLink).run(null);
      }
 else {
        IWorkbenchPage page=OwlUI.getPage();
        if (page != null)         OwlUI.openInFeedView(page,new StructuredSelection(existingBookMark));
      }
    }
  }
);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: Application.java (Click to view .java file)

Method Code:
vote
like

public void run(){
  if (existingBookMark == null) {
    new NewBookMarkAction(shell,null,null,normalizedLink).run(null);
  }
 else {
    IWorkbenchPage page=OwlUI.getPage();
    if (page != null)     OwlUI.openInFeedView(page,new StructuredSelection(existingBookMark));
  }
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: ApplicationActionBarAdvisor.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @param trayItem
 * @param shell
 * @param advisor
 */
protected void fillTrayItem(IMenuManager trayItem,final Shell shell,final ApplicationWorkbenchWindowAdvisor advisor){
  trayItem.add(new ReloadAllAction(false));
  trayItem.add(new Separator());
  trayItem.add(new Action(Messages.ApplicationActionBarAdvisor_CONFIGURE_NOTIFICATIONS){
    @Override public void run(){
      advisor.restoreFromTray(shell);
      PreferencesUtil.createPreferenceDialogOn(shell,NotifierPreferencesPage.ID,null,null).open();
    }
    @Override public ImageDescriptor getImageDescriptor(){
      return OwlUI.getImageDescriptor("icons/elcl16/notification.gif");
    }
  }
);
  trayItem.add(new Action(Messages.ApplicationActionBarAdvisor_PREFERENCES){
    @Override public void run(){
      advisor.restoreFromTray(shell);
      PreferencesUtil.createPreferenceDialogOn(shell,OverviewPreferencesPage.ID,null,null).open();
    }
    @Override public ImageDescriptor getImageDescriptor(){
      return OwlUI.getImageDescriptor("icons/elcl16/preferences.gif");
    }
  }
);
  trayItem.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  trayItem.add(new Action(Messages.ApplicationActionBarAdvisor_EXIT){
    @Override public void run(){
      PlatformUI.getWorkbench().close();
    }
  }
);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal

Source Code: ApplicationActionBarAdvisor.java (Click to view .java file)

Method Code:
vote
like

@Override public void run(){
  advisor.restoreFromTray(shell);
  PreferencesUtil.createPreferenceDialogOn(shell,OverviewPreferencesPage.ID,null,null).open();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: ReloadTypesAction.java (Click to view .java file)

Method Code:
vote
like

public void setActivePart(IAction action,IWorkbenchPart targetPart){
  fShell=targetPart.getSite().getShell();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: ShowSynchronizationStatusAction.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @param shell the {@link Shell} to open the Activity Dialog into.
 */
public void init(Shell shell){
  fShellProvider=new SameShellProvider(shell);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: NewTypeDropdownAction.java (Click to view .java file)

Method Code:
vote
like

private void addSearchMark(){
  new NewSearchMarkAction(fShell,fParent,fPosition).run(null);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: CreateFilterAction.java (Click to view .java file)

Method Code:
vote
like

public void run(IAction action){
  Shell shell=OwlUI.getActiveShell();
  if (shell != null && !fSelection.isEmpty()) {
    ISearch presetSearch=Owl.getModelFactory().createSearch(null);
    fillSearchConditions(presetSearch);
    presetSearch.setMatchAllConditions(true);
    List<IFilterAction> presetActions=null;
    boolean matchAll=false;
switch (fPresetAction) {
case DOWNLOAD:
      presetActions=Collections.singletonList(Owl.getModelFactory().createFilterAction(DownloadAttachmentsNewsAction.ID));
    matchAll=true;
  break;
case LABEL:
presetActions=Collections.singletonList(Owl.getModelFactory().createFilterAction(LabelNewsAction.ID));
break;
case MOVE:
presetActions=Collections.singletonList(Owl.getModelFactory().createFilterAction(MoveNewsAction.ID));
break;
case COPY:
presetActions=Collections.singletonList(Owl.getModelFactory().createFilterAction(CopyNewsAction.ID));
break;
}
NewsFilterDialog dialog;
if (presetActions != null && !presetActions.isEmpty()) dialog=new NewsFilterDialog(shell,presetSearch,presetActions,matchAll);
 else dialog=new NewsFilterDialog(shell,presetSearch);
Collection<ISearchFilter> existingFilters=DynamicDAO.loadAll(ISearchFilter.class);
if (existingFilters != null && !existingFilters.isEmpty()) dialog.setFilterPosition(existingFilters.size());
if (dialog.open() == IDialogConstants.OK_ID) {
NewsFiltersListDialog filterListDialog=NewsFiltersListDialog.getVisibleInstance();
if (filterListDialog == null) {
filterListDialog=new NewsFiltersListDialog(shell);
filterListDialog.setSelection(dialog.getFilter());
filterListDialog.open();
}
 else {
filterListDialog.refresh();
filterListDialog.setSelection(dialog.getFilter());
filterListDialog.getShell().forceActive();
if (filterListDialog.getShell().getMinimized()) filterListDialog.getShell().setMinimized(false);
}
}
}
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: SearchFeedsAction.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @param shell the {@link Shell} acting as parent of the wizard.
 */
public void openWizard(Shell shell){
  ImportAction action=new ImportAction();
  action.openWizardForKeywordSearch(shell);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: FindExtensionsAction.java (Click to view .java file)

Method Code:
vote
like

@Override public void done(final IJobChangeEvent event){
  final Shell validShell=getValidShell();
  if (event.getJob() == fJob) {
    Job.getJobManager().removeJobChangeListener(this);
    Job.getJobManager().cancel(fJob);
    if (fJob.getStatus() == Status.CANCEL_STATUS)     return;
    if (fJob.getStatus() != Status.OK_STATUS)     getValidShell().getDisplay().syncExec(new Runnable(){
      public void run(){
        org.eclipse.update.internal.ui.UpdateUI.log(fJob.getStatus(),true);
      }
    }
);
    validShell.getDisplay().asyncExec(new Runnable(){
      public void run(){
        validShell.getDisplay().beep();
        BusyIndicator.showWhile(validShell.getDisplay(),new Runnable(){
          public void run(){
            openInstallWizard2();
          }
        }
);
      }
    }
);
  }
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: FindExtensionsAction.java (Click to view .java file)

Method Code:
vote
like

public void run(){
  validShell.getDisplay().beep();
  BusyIndicator.showWhile(validShell.getDisplay(),new Runnable(){
    public void run(){
      openInstallWizard2();
    }
  }
);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: NewBookMarkAction.java (Click to view .java file)

Method Code:
vote
like

public void setActivePart(IAction action,IWorkbenchPart targetPart){
  fShell=targetPart.getSite().getShell();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: ReloadAllAction.java (Click to view .java file)

Method Code:
vote
like

@Override public void run(){
  JobRunner.runInBackgroundThread(new Runnable(){
    public void run(){
      Collection<IFolder> rootFolders=CoreUtils.loadRootFolders();
      new ReloadTypesAction(new StructuredSelection(rootFolders.toArray()),fShell).run();
    }
  }
);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: ReloadAllAction.java (Click to view .java file)

Method Code:
vote
like

public void run(){
  Collection<IFolder> rootFolders=CoreUtils.loadRootFolders();
  new ReloadTypesAction(new StructuredSelection(rootFolders.toArray()),fShell).run();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: AssignLabelsAction.java (Click to view .java file)

Method Code:
vote
like

@Override public void run(){
  List<INews> entities=ModelUtils.getEntities(fSelection,INews.class);
  Set<INews> news=new HashSet<INews>(entities);
  if (!news.isEmpty())   new AssignLabelsDialog(fShell,news).open();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: ShowActivityAction.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @param shell the {@link Shell} to open the Activity Dialog into.
 */
public void init(Shell shell){
  fShellProvider=new SameShellProvider(shell);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: NewFolderAction.java (Click to view .java file)

Method Code:
vote
like

public void setActivePart(IAction action,IWorkbenchPart targetPart){
  fShell=targetPart.getSite().getShell();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: ExportAction.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @param shell the {@link Shell} acting as parent of the wizard.
 */
public void openWizard(Shell shell){
  ExportWizard exportWizard=new ExportWizard();
  OwlUI.openWizard(shell,exportWizard,true,false,SETTINGS_SECTION);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: FindUpdatesAction.java (Click to view .java file)

Method Code:
vote
like

public void init(IWorkbenchWindow window){
  fShell=window.getShell();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: CleanUpAction.java (Click to view .java file)

Method Code:
vote
like

/** 
 * @param shell the {@link Shell} acting as parent of the wizard.
 */
public void openWizard(Shell shell){
  CleanUpWizard cleanUpWizard=new CleanUpWizard();
  OwlUI.openWizard(shell,cleanUpWizard,true,true,SETTINGS_SECTION);
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: NewSearchMarkAction.java (Click to view .java file)

Method Code:
vote
like

public void setActivePart(IAction action,IWorkbenchPart targetPart){
  fShell=targetPart.getSite().getShell();
}
 

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: NewNewsBinAction.java (Click to view .java file)

Method Code:
vote
like

public void setActivePart(IAction action,IWorkbenchPart targetPart){
  fShell=targetPart.getSite().getShell();
}