Examples of TaskTag


Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

  private void addTag() {
    TaskTagDialog dlg = new TaskTagDialog(fControl.getShell());
    int result = dlg.open();
    if (result == Window.OK) {
      TaskTag newTag = dlg.taskTag;
      List newTags = new ArrayList(Arrays.asList(fTaskTags));
      newTags.add(newTag);
      fTaskTags = (TaskTag[]) newTags.toArray(new TaskTag[newTags.size()]);
      valueTable.setInput(fTaskTags);
      valueTable.getTable().setSelection(fTaskTags.length - 1);
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

    }
    Integer[] priorities = (Integer[]) list.toArray(new Integer[0]);

    fTaskTags = new TaskTag[Math.min(tags.length, priorities.length)];
    for (int i = 0; i < fTaskTags.length; i++) {
      fTaskTags[i] = new TaskTag(tags[i], priorities[i].intValue());
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

          String[] tags = new String[fTaskTags.length];
          for (int i = 0; i < tags.length; i++) {
            tags[i] = fTaskTags[i].getTag();
          }
          getButton(IDialogConstants.OK_ID).setEnabled(tagText.getText().length() > 0 && !Arrays.asList(tags).contains(testTag));
          taskTag = new TaskTag(tagText.getText(), priorityCombo.getSelectionIndex());
        }
      });

      label = new Label(composite, SWT.NONE);
      label.setText(SSEUIMessages.TaskTagPreferenceTab_7); //$NON-NLS-1$
      label.setLayoutData(new GridData());
      priorityCombo = new Combo(composite, SWT.READ_ONLY | SWT.SINGLE);
      priorityCombo.setItems(new String[]{SSEUIMessages.TaskTagPreferenceTab_0, SSEUIMessages.TaskTagPreferenceTab_1, SSEUIMessages.TaskTagPreferenceTab_2});
      priorityCombo.select(taskTag != null ? taskTag.getPriority() : TaskTag.PRIORITY_NORMAL);
      priorityCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      priorityCombo.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          taskTag = new TaskTag(taskTag.getTag(), priorityCombo.getSelectionIndex());
        }
      });
        Dialog.applyDialogFont(parent);
      return composite;
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

     * (non-Javadoc)
     *
     * @see org.eclipse.jface.dialogs.Dialog#okPressed()
     */
    protected void okPressed() {
      taskTag = new TaskTag(tagText.getText(), priorityCombo.getSelectionIndex());
      super.okPressed();
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

  private void addTag() {
    TaskTagDialog dlg = new TaskTagDialog(fControl.getShell());
    int result = dlg.open();
    if (result == Window.OK) {
      TaskTag newTag = dlg.taskTag;
      List newTags = new ArrayList(Arrays.asList(fTaskTags));
      newTags.add(newTag);
      fTaskTags = (TaskTag[]) newTags.toArray(new TaskTag[newTags.size()]);
      valueTable.setInput(fTaskTags);
      valueTable.getTable().setSelection(fTaskTags.length - 1);
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

    }
    Integer[] priorities = (Integer[]) list.toArray(new Integer[0]);

    fTaskTags = new TaskTag[Math.min(tags.length, priorities.length)];
    for (int i = 0; i < fTaskTags.length; i++) {
      fTaskTags[i] = new TaskTag(tags[i], priorities[i].intValue());
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

          String[] tags = new String[fTaskTags.length];
          for (int i = 0; i < tags.length; i++) {
            tags[i] = fTaskTags[i].getTag();
          }
          getButton(IDialogConstants.OK_ID).setEnabled(tagText.getText().length() > 0 && !Arrays.asList(tags).contains(testTag));
          taskTag = new TaskTag(tagText.getText(), priorityCombo.getSelectionIndex());
        }
      });

      label = new Label(composite, SWT.NONE);
      label.setText(SSEUIMessages.TaskTagPreferenceTab_7); //$NON-NLS-1$
      label.setLayoutData(new GridData());
      priorityCombo = new Combo(composite, SWT.READ_ONLY | SWT.SINGLE);
      priorityCombo.setItems(new String[]{SSEUIMessages.TaskTagPreferenceTab_0, SSEUIMessages.TaskTagPreferenceTab_1, SSEUIMessages.TaskTagPreferenceTab_2});
      priorityCombo.select(taskTag != null ? taskTag.getPriority() : TaskTag.PRIORITY_NORMAL);
      priorityCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      priorityCombo.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          taskTag = new TaskTag(taskTag.getTag(), priorityCombo.getSelectionIndex());
        }
      });
        Dialog.applyDialogFont(parent);
      return composite;
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

     * (non-Javadoc)
     *
     * @see org.eclipse.jface.dialogs.Dialog#okPressed()
     */
    protected void okPressed() {
      taskTag = new TaskTag(tagText.getText(), priorityCombo.getSelectionIndex());
      super.okPressed();
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

   */
  private int getTaskPriority(String taskStr) {

    String taskTagLowerCase = taskStr.toLowerCase();
    for (int i = 0; i < taskTags.length; i++) {
      TaskTag taskTag = taskTags[i];
      if (taskTag.getTag().toLowerCase().equals(taskTagLowerCase)) {
        return taskTag.getPriority();
      }
    }

    return TaskTag.PRIORITY_NORMAL;
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.tasks.TaskTag

    list.toArray(allPriorities);

    TaskTag[] taskTags = new TaskTag[Math.min(tags.length,
        priorities.length)];
    for (int i = 0; i < taskTags.length; i++) {
      taskTags[i] = new TaskTag(tags[i], allPriorities[i].intValue());
    }
    return taskTags;
  }
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.