rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return access.getDefaultPersonalAccess().toCharArray();
return Access.getDefaultPersonalAccess().toCharArray();
private char[] getAclChars(BwShareableDbentity ent) throws CalFacadeException { if (ent instanceof BwShareableContainedDbentity) { BwCalendar container; if (ent instanceof BwCalendar) { container = (BwCalendar)ent; } else { container = ((BwShareableContainedDbentity)ent).getCalendar();...
return access.getDefaultPersonalAccess();
return Access.getDefaultPersonalAccess();
public String getDefaultPersonalAccess() { return access.getDefaultPersonalAccess(); }
return access.getDefaultPublicAccess();
return Access.getDefaultPublicAccess();
public String getDefaultPublicAccess() { return access.getDefaultPublicAccess(); }
try { return dt1.getDate().compareTo(dt2.getDate()); } catch (CalFacadeException cfe) { throw new RuntimeException(cfe); }
return dt1.getDate().compareTo(dt2.getDate());
public int compare(Object o1, Object o2) { if (o1 == o2) { return 0; } if (!(o1 instanceof BwDateTime)) { return -1; } if (!(o2 instanceof BwDateTime)) { return 1; } BwDateTime dt1 = (BwDateTime)o1; BwDateTime dt2 = (BwDateTime)o2; try { return dt1.getDate().compareTo(dt...
public String getDate() throws CalFacadeException {
public String getDate() {
public String getDate() throws CalFacadeException { return date; }
doAuth(cardnumber, monthExpires, yearExpires, Double.parseDouble(amount) / (double) amountMultiplier, currency, "5", null, authIDRsp);
doAuth(cardnumber, monthExpires, yearExpires, Double.parseDouble(amount) / (double) amountMultiplier, currency, "1", null, authIDRsp);
public void finishTransaction(String properties) throws CreditCardAuthorizationException { HashMap map = parseProperties(properties); String cardnumber = (String) map.get(TPOS3Client.PN_PAN); String expires = (String) map.get(TPOS3Client.PN_EXPIRE); String amount = (String) map.get(TPOS3Client.PN_AMOUNT); ...
System.out.println(nameOfReport); System.out.println(TextSoap.encodeToValidExcelSheetName(nameOfReport)); System.out.println(nameOfReport);
public void writeSimpleExcelFile(JRDataSource reportData, String nameOfReport, String filePathAndName, ReportDescription description) throws IOException{ if(nameOfReport==null || "".equals(nameOfReport)){ nameOfReport = "Report"; } System.out.println(nameOfReport); System.out.println(TextSoap.encodeToValidExcelS...
HSSFSheet sheet = sheet = wb.createSheet(TextSoap.encodeToValidExcelSheetName(nameOfReport));
HSSFSheet sheet = wb.createSheet(TextSoap.encodeToValidExcelSheetName(nameOfReport));
public void writeSimpleExcelFile(JRDataSource reportData, String nameOfReport, String filePathAndName, ReportDescription description) throws IOException{ if(nameOfReport==null || "".equals(nameOfReport)){ nameOfReport = "Report"; } System.out.println(nameOfReport); System.out.println(TextSoap.encodeToValidExcelS...
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.StereotypeEditPart.VISUAL_ID);
semanticHint = UMLVisualIDRegistry.getType(StereotypeEditPart.VISUAL_ID);
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.StereotypeEditPart.VISUAL_ID); view.setType(semanticHint); ...
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy()); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new RegionSubvertices2ItemSemanticEditPolicy()); installEditPolicy(EditPolicyRoles.CREATION_ROLE, n...
firePlaybackCompleted(player);
next();
public void playbackCompleted() { firePlaybackCompleted(player); }
firePlaybackCompleted(player);
next();
public void playbackFailed() { firePlaybackCompleted(player); }
firePlaybackStarted(player);
public void playbackStarted() { firePlaybackStarted(player); }
firePlaybackStopped(player);
public void playbackStopped() { firePlaybackStopped(player); }
return player;
return (playerThread != null) ? playerThread.getPlayer() : null;
public Player getPlayer() { return player; }
return (player != null) ? player.getResource() : null;
return (getPlayer() != null) ? getPlayer().getResource() : null;
public URL getPlayingURL() { return (player != null) ? player.getResource() : null; }
return player != null && player.isPlaying();
return getPlayer() != null && getPlayer().isPlaying();
public synchronized boolean isPlaying() { return player != null && player.isPlaying(); }
if (p1.account == null) { throw new RuntimeException("Null account for UserVO object id=" + p1.getId());
if (p1.getKind() < p2.getKind()) { return -1;
public int compare(Object o1, Object o2) { if (!(o1 instanceof BwPrincipal)) { return -1; } if (!(o2 instanceof BwPrincipal)) { return 1; } BwPrincipal p1 = (BwPrincipal)o1; BwPrincipal p2 = (BwPrincipal)o2; if (p1.account == null) { // Should not happen throw new RuntimeExcep...
if (p2.account == null) { throw new RuntimeException("Null account for UserVO object id=" + p2.getId());
if (p1.getKind() > p2.getKind()) { return 1;
public int compare(Object o1, Object o2) { if (!(o1 instanceof BwPrincipal)) { return -1; } if (!(o2 instanceof BwPrincipal)) { return 1; } BwPrincipal p1 = (BwPrincipal)o1; BwPrincipal p2 = (BwPrincipal)o2; if (p1.account == null) { // Should not happen throw new RuntimeExcep...
return p1.account.compareTo(p2.account);
return CalFacadeUtil.compareStrings(p1.getAccount(), p2.getAccount());
public int compare(Object o1, Object o2) { if (!(o1 instanceof BwPrincipal)) { return -1; } if (!(o2 instanceof BwPrincipal)) { return 1; } BwPrincipal p1 = (BwPrincipal)o1; BwPrincipal p2 = (BwPrincipal)o2; if (p1.account == null) { // Should not happen throw new RuntimeExcep...
t.printStackTrace();
public int doEndTag() throws JspTagException { try { /* Try to retrieve the value */ String val = getString(false); JspWriter out = pageContext.getOut(); if (tagName == null) { tagName = property; } // Assume we're indented for the first tag out.print('<'); out.print(...
Properties uidprops = new Properties(); uidprops.setProperty("separator", "-"); uuidGen = new UUIDHexGenerator(); ((Configurable)uuidGen).configure(Hibernate.STRING, uidprops, null);
public Events(Calintf cal, AccessUtil access, BwUser user, boolean debug) { super(cal, access, user, debug); Properties uidprops = new Properties(); uidprops.setProperty("separator", "-"); uuidGen = new UUIDHexGenerator(); ((Configurable)uuidGen).configure(Hibernate.STRING, uidprops, null); }
String guidPrefix = "CAL-" + (String)uuidGen.generate(null, null);
String guidPrefix = "CAL-" + (String)getUuidGen().generate(null, null);
public void assignGuid(BwEvent val) throws CalFacadeException { if (val == null) { return; } String guidPrefix = "CAL-" + (String)uuidGen.generate(null, null); if (val.getName() == null) { val.setName(guidPrefix + ".ics"); } if (val.getGuid() != null) { return; } String guid = g...
if (debug) { trace("getEvents for start=" + startDate + " end=" + endDate); }
public Collection getEvents(BwCalendar calendar, BwFilter filter, BwDateTime startDate, BwDateTime endDate, int recurRetrieval, int currentMode, boolean ignoreCreator) throws CalFacadeException { HibSession sess = getSe...
if (debug) { trace("Found " + es.size() + " events"); }
public Collection getEvents(BwCalendar calendar, BwFilter filter, BwDateTime startDate, BwDateTime endDate, int recurRetrieval, int currentMode, boolean ignoreCreator) throws CalFacadeException { HibSession sess = getSe...
public static int openError(Shell parentShell, String title, String message, IStatus status, int displayMask) { ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
public static int openError(Shell parent, String dialogTitle, String message, IStatus status) { return openError(parent, dialogTitle, message, status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
public static int openError(Shell parentShell, String title, String message, IStatus status, int displayMask) { ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();}
public void put(String key,String value);
public void put(String key, String[] value);
public void put(String key,String value);
public final void sourceChanged(final int sourcePriority, final String sourceName, final Object sourceValue) { updateEvaluationContext(sourceName, sourceValue); sourceChanged(sourcePriority); }
protected abstract void sourceChanged(final int sourcePriority);
public final void sourceChanged(final int sourcePriority, final String sourceName, final Object sourceValue) { updateEvaluationContext(sourceName, sourceValue); sourceChanged(sourcePriority); }
protected void internalRefresh(Widget widget, Object element, boolean doStruct, boolean updateLabels) { if (widget instanceof Item) { if (doStruct) { updatePlus((Item) widget, element); } if (updateLabels || !equals(element, widget.getData())) { doUpdateItem(widget, element, true); } else { associate(element, (Item) w...
protected void internalRefresh(Object element) { internalRefresh(element, true);
protected void internalRefresh(Widget widget, Object element, boolean doStruct, boolean updateLabels) { if (widget instanceof Item) { if (doStruct) { updatePlus((Item) widget, element); } if (updateLabels || !equals(element, widget.getData())) { ...
public static IEditorPart openEditor(IWorkbenchPage page, IFile input) throws PartInitException { if (page == null) {
public static IEditorPart openEditor(IWorkbenchPage page, IEditorInput input, String editorId) throws PartInitException { if (page == null) {
public static IEditorPart openEditor(IWorkbenchPage page, IFile input) throws PartInitException { //sanity checks if (page == null) { throw new IllegalArgumentException(); } // open the editor on the file IEditorDescriptor editorDesc = getEditorDescriptor(input); ret...
IEditorDescriptor editorDesc = getEditorDescriptor(input); return page.openEditor(new FileEditorInput(input), editorDesc.getId()); }
return page.openEditor(input, editorId); }
public static IEditorPart openEditor(IWorkbenchPage page, IFile input) throws PartInitException { //sanity checks if (page == null) { throw new IllegalArgumentException(); } // open the editor on the file IEditorDescriptor editorDesc = getEditorDescriptor(input); ret...
final boolean parametersChanged, final boolean returnTypeChanged) { super(definedChanged, descriptionChanged, nameChanged); if (command == null) throw new NullPointerException(); this.command = command; if (categoryChanged) { changedValues |= CHANGED_CATEGORY; } if (handledChanged) { changedValues |= CHANGED_HANDLED;...
final boolean parametersChanged) { this(command, categoryChanged, definedChanged, descriptionChanged, handledChanged, nameChanged, parametersChanged, false);
public CommandEvent(final Command command, final boolean categoryChanged, final boolean definedChanged, final boolean descriptionChanged, final boolean handledChanged, final boolean nameChanged, final boolean parametersChanged, final boolean returnTypeChanged) { super(definedChanged, descriptionChanged, nameCha...
public static final KeySequence getInstance(final KeyStroke[] keyStrokes) { return new KeySequence(keyStrokes);
public static final KeySequence getInstance() { return EMPTY_KEY_SEQUENCE;
public static final KeySequence getInstance(final KeyStroke[] keyStrokes) { return new KeySequence(keyStrokes); }
public WritableValue(Object valueType, Object initialValue) { this(Realm.getDefault(), valueType, initialValue);
public WritableValue(Object initialValue) { this(Realm.getDefault(), null, initialValue);
public WritableValue(Object valueType, Object initialValue) { this(Realm.getDefault(), valueType, initialValue); }
public void insertAfter(String ID, IContributionItem item) { IContributionItem ci = find(ID); if (ci == null) { throw new IllegalArgumentException("can't find ID"); } int ix = contributions.indexOf(ci); if (ix >= 0) { if (allowItem(item)) { contributions.add(ix + 1, item); itemAdded(item); } }
public void insertAfter(String ID, IAction action) { insertAfter(ID, new ActionContributionItem(action));
public void insertAfter(String ID, IContributionItem item) { IContributionItem ci = find(ID); if (ci == null) { throw new IllegalArgumentException("can't find ID");//$NON-NLS-1$ } int ix = contributions.indexOf(ci); if (ix >= 0) { // System.out.println("insert after: " + ix...
null,
public List getAllCheckedListItems(IProgressMonitor monitor) { List result = new ArrayList(); //Iterate through the children of the root as the root is not in the store Object[] children = treeContentProvider.getChildren(root); for (int i = 0; i < children.length; ++i) { findAllSelectedListElements( children[i], w...
public void add(IPerspectiveDescriptor desc) { if (shortcuts.contains(desc)) return; int size = shortcuts.size(); int preferredSize = DEFAULT_DEPTH; while (size >= preferredSize) { size--; shortcuts.remove(size); } shortcuts.add(0, desc); fireChange();
public void add(String id) { IPerspectiveDescriptor desc = reg.findPerspectiveWithId(id); if (desc != null) add(desc);
public void add(IPerspectiveDescriptor desc) { // Avoid duplicates if (shortcuts.contains(desc)) return; // If the shortcut list will be too long, remove oldest ones int size = shortcuts.size(); int preferredSize = DEFAULT_DEPTH; while (size >= preferredSize) { size--; shortcuts.remove(size); } // I...
public void closeAllPages(boolean save) { if (save) { boolean ret = saveAllPages(true); if (!ret) return;
private void closeAllPages() { setActivePage(null); PageList oldList = pageList; pageList = new PageList(); Iterator itr = oldList.iterator(); while (itr.hasNext()) { WorkbenchPage page = (WorkbenchPage) itr.next(); firePageClosed(page); page.dispose();
public void closeAllPages(boolean save) { if (save) { boolean ret = saveAllPages(true); if (!ret) return; } closeAllPages(); }
closeAllPages();
if (!closing) showEmptyWindowContents();
public void closeAllPages(boolean save) { if (save) { boolean ret = saveAllPages(true); if (!ret) return; } closeAllPages(); }
public TreeFrame(AbstractTreeViewer viewer, Object input) { this(viewer); setInput(input); ILabelProvider provider = (ILabelProvider) viewer.getLabelProvider(); String name = provider.getText(input); if(name == null) { name = ""; } setName(name); setToolTipText(name);
public TreeFrame(AbstractTreeViewer viewer) { this.viewer = viewer;
public TreeFrame(AbstractTreeViewer viewer, Object input) { this(viewer); setInput(input); ILabelProvider provider = (ILabelProvider) viewer.getLabelProvider(); String name = provider.getText(input); if(name == null) { name = "";//$NON-NLS-1$ } setName(name); setT...
public static int compare(List left, List right) { if (left == null && right == null) return 0; else if (left == null) return -1; else if (right == null) return 1; else { int l = left.size(); int r = right.size(); if (l != r) return l - r; else { for (int i = 0; i < l; i++) { int compareTo = compare((Comparable) left....
public static int compare(boolean left, boolean right) { return left == false ? (right == true ? -1 : 0) : 1;
public static int compare(List left, List right) { if (left == null && right == null) return 0; else if (left == null) return -1; else if (right == null) return 1; else { int l = left.size(); int r = right.size(); if (l !=...
IObservable modelObservable, BindSpec bindSpec) {
IObservable modelObservable, org.eclipse.jface.databinding.BindSpec bindSpec) {
public Binding bind(IObservable targetObservable, IObservable modelObservable, BindSpec bindSpec) { Binding result = doCreateBinding(targetObservable, modelObservable, bindSpec, this); if (result != null) return result; throw new BindingException( "No binding found for target: " + targetObservable.getClas...
public DialogMarkerProperties(Shell parentShell, String title) {
public DialogMarkerProperties(Shell parentShell) {
public DialogMarkerProperties(Shell parentShell, String title) { super(parentShell); setShellStyle(getShellStyle() | SWT.RESIZE); this.title = title; }
this.title = title;
public DialogMarkerProperties(Shell parentShell, String title) { super(parentShell); setShellStyle(getShellStyle() | SWT.RESIZE); this.title = title; }
public IViewReference createView(String id, String secondaryId) throws PartInitException { IViewDescriptor desc = viewReg.find(id); if (desc == null) throw new PartInitException(WorkbenchMessages.format("ViewFactory.couldNotCreate", new Object[] { id })); if (secondaryId != null) { if (!desc.getAllowMultiple()) { thr...
public IViewReference createView(final String id) throws PartInitException { return createView(id, null);
public IViewReference createView(String id, String secondaryId) throws PartInitException { IViewDescriptor desc = viewReg.find(id); // ensure that the view id is valid if (desc == null) throw new PartInitException(WorkbenchMessages.format("ViewFactory.couldNotCreate", new Object[] { id })); //$NON-NLS-1$ // ensu...
public PartStack(int appearance, AbstractPresentationFactory factory) { super("PartStack"); this.appearance = appearance; this.factory = factory;
public PartStack(int appearance) { this(appearance, null);
public PartStack(int appearance, AbstractPresentationFactory factory) { super("PartStack"); //$NON-NLS-1$ this.appearance = appearance; this.factory = factory; }
public void setPerspective(final IPerspectiveDescriptor desc) { if (Util.equals(getPerspective(), desc)) { return; } ICoolBarManager2 mgr = (ICoolBarManager2) window.getCoolBarManager2();
private void setPerspective(Perspective newPersp) { Perspective oldPersp = getActivePerspective(); if (oldPersp == newPersp) { return; } window.largeUpdateStart();
public void setPerspective(final IPerspectiveDescriptor desc) { if (Util.equals(getPerspective(), desc)) { return; } // Going from multiple to single rows can make the coolbar // and its adjacent views appear jumpy as perspectives are // switched. Turn off redraw to help with this....
mgr.getControl2().setRedraw(false); getClientComposite().setRedraw(false); BusyIndicator.showWhile(null, new Runnable() { public void run() { busySetPerspective(desc);
if (oldPersp != null) { window.firePerspectivePreDeactivate(this, oldPersp.getDesc()); } if (newPersp != null) { IStatus status = newPersp.restoreState(); if (status.getSeverity() != IStatus.OK) { String title = WorkbenchMessages.WorkbenchPage_problemRestoringTitle; String msg = WorkbenchMessages.WorkbenchPage_errorR...
public void setPerspective(final IPerspectiveDescriptor desc) { if (Util.equals(getPerspective(), desc)) { return; } // Going from multiple to single rows can make the coolbar // and its adjacent views appear jumpy as perspectives are // switched. Turn off redraw to help with this....
});
}
public void setPerspective(final IPerspectiveDescriptor desc) { if (Util.equals(getPerspective(), desc)) { return; } // Going from multiple to single rows can make the coolbar // and its adjacent views appear jumpy as perspectives are // switched. Turn off redraw to help with this....
getClientComposite().setRedraw(true); mgr.getControl2().setRedraw(true); IWorkbenchPart part = getActivePart(); if (part != null) { part.setFocus();
window.largeUpdateEnd(); if (newPersp == null) { return;
public void setPerspective(final IPerspectiveDescriptor desc) { if (Util.equals(getPerspective(), desc)) { return; } // Going from multiple to single rows can make the coolbar // and its adjacent views appear jumpy as perspectives are // switched. Turn off redraw to help with this....
IPerspectiveDescriptor desc = newPersp.getDesc(); if (desc == null) { return; } if (dirtyPerspectives.remove(desc.getId())) { suggestReset(); }
public void setPerspective(final IPerspectiveDescriptor desc) { if (Util.equals(getPerspective(), desc)) { return; } // Going from multiple to single rows can make the coolbar // and its adjacent views appear jumpy as perspectives are // switched. Turn off redraw to help with this....
public SLocation(final SLocation parent, final String id) { this(parent, id, MNEMONIC_NONE);
public SLocation() { this(new SBar());
public SLocation(final SLocation parent, final String id) { this(parent, id, MNEMONIC_NONE); }
public static final boolean equals(final Object[] leftArray, final Object[] rightArray) { if (leftArray.length != rightArray.length) { return false; } for (int i = 0; i < leftArray.length; i++) { final Object left = leftArray[i]; final Object right = rightArray[i]; final boolean equal = (left == null) ? (right == null...
public static final boolean equals(final Object left, final Object right) { return left == null ? right == null : ((right != null) && left .equals(right));
public static final boolean equals(final Object[] leftArray, final Object[] rightArray) { if (leftArray.length != rightArray.length) { return false; } for (int i = 0; i < leftArray.length; i++) { final Object left = leftArray[i]; final Object right = rightArray[i]; final boolean equal = (left == null) ? (...
public void hideView(IViewPart view) { hideView((IViewReference)getReference(view));
public void hideView(IViewReference ref) { if (ref == null) { return; } Perspective persp = getActivePerspective(); if (persp == null) { return; } boolean promptedForSave = false; IViewPart view = ref.getView(false); if (view != null) { if (!certifyPart(view)) { return; } if (view instanceof ISaveablePart) { ISa...
public void hideView(IViewPart view) { hideView((IViewReference)getReference(view)); }
public void selectionChanged(SelectionChangedEvent event) { ISelection sel = event.getSelection(); if (sel instanceof IStructuredSelection) selectionChanged((IStructuredSelection) sel);
public void selectionChanged(IStructuredSelection newSelection) { this.selection = newSelection; if (delegate == null) { if (isOkToCreateDelegate()) delegate = createDelegate(); } if (hasAdaptableType()) this.selection = getResourceAdapters(newSelection); if (enabler != null) { setEnabled(enabler.isEnabledForSelec...
public void selectionChanged(SelectionChangedEvent event) { ISelection sel = event.getSelection(); if (sel instanceof IStructuredSelection) selectionChanged((IStructuredSelection) sel); }
public FontFieldEditor(String name, String labelText, String previewAreaText, Composite parent) { init(name, labelText); previewText = previewAreaText; changeButtonText = JFaceResources.getString("openChange"); createControl(parent);
protected FontFieldEditor() {
public FontFieldEditor(String name, String labelText, String previewAreaText, Composite parent) { init(name, labelText); previewText = previewAreaText; changeButtonText = JFaceResources.getString("openChange"); //$NON-NLS-1$ createControl(parent); }
public static ImageDescriptor createFromImage(Image img, Device theDevice) { return new ImageDataImageDescriptor(img, theDevice);
public static ImageDescriptor createFromImage(Image img) { return new ImageDataImageDescriptor(img);
public static ImageDescriptor createFromImage(Image img, Device theDevice) { return new ImageDataImageDescriptor(img, theDevice); }
public void fill(Menu parent, int index) {
public void fill(Composite parent) {
public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } el...
Menu subMenu = null;
public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } el...
int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } else if (style == IAction.AS_RADIO_BUTTON) {
if (action.getStyle() == IAction.AS_CHECK_BOX) { flags = SWT.TOGGLE; } if (action.getStyle() == IAction.AS_RADIO_BUTTON) {
public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } el...
} else if (style == IAction.AS_DROP_DOWN_MENU) { IMenuCreator mc = action.getMenuCreator(); if (mc != null) { subMenu = mc.getMenu(parent); flags = SWT.CASCADE; } }
}
public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } el...
MenuItem mi = null; if (index >= 0) { mi = new MenuItem(parent, flags, index); } else { mi = new MenuItem(parent, flags);
Button b = new Button(parent, flags); b.setData(this); b.addListener(SWT.Dispose, getButtonListener()); b.addListener(SWT.Selection, getButtonListener()); if (action.getHelpListener() != null) { b.addHelpListener(action.getHelpListener());
public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } el...
widget = mi; mi.setData(this); mi.addListener(SWT.Dispose, getMenuItemListener()); mi.addListener(SWT.Selection, getMenuItemListener()); if (action.getHelpListener() != null) { mi.addHelpListener(action.getHelpListener()); } if (subMenu != null) { mi.setMenu(subMenu); }
widget = b;
public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) { flags = SWT.CHECK; } el...
public void write(IFile resource, String destinationPath) throws IOException, CoreException { ZipEntry newEntry = new ZipEntry(destinationPath); write(newEntry, resource);
private void write(ZipEntry entry, IFile contents) throws IOException, CoreException { byte[] readBuffer = new byte[4096]; if (!useCompression) { entry.setMethod(ZipEntry.STORED); InputStream contentStream = contents.getContents(false); int length = 0; CRC32 checksumCalculator = new CRC32(); try { int n; while ((n = ...
public void write(IFile resource, String destinationPath) throws IOException, CoreException { ZipEntry newEntry = new ZipEntry(destinationPath); write(newEntry, resource); }
public boolean isPartVisible(IWorkbenchPartReference reference) { IWorkbenchPart part = reference.getPart(false); if (part == null) { return false; } return isPartVisible(part);
public boolean isPartVisible(IWorkbenchPart part) { PartPane pane = getPane(part); return pane != null && pane.getVisible();
public boolean isPartVisible(IWorkbenchPartReference reference) { IWorkbenchPart part = reference.getPart(false); // Can't be visible if it isn't created yet if (part == null) { return false; } return isPartVisible(part); }
if(colorProvider == null){ if(usedDecorators){ if(background != null) control.setBackground(background); if(foreground != null) control.setForeground(foreground); } } else{ control.setBackground(background); control.setForeground(foreground); }
if(usedDecorators){ if(background != null) control.setBackground(background);
public void applyFontsAndColors(TreeItem control) { if(colorProvider == null){ if(usedDecorators){ //If there is no provider only apply set values if(background != null) control.setBackground(background); if(foreground != null) control.setForeground(foreground); } } else{ /...
if(fontProvider == null){ if(usedDecorators && font != null)
if(foreground != null) control.setForeground(foreground); if(font != null)
public void applyFontsAndColors(TreeItem control) { if(colorProvider == null){ if(usedDecorators){ //If there is no provider only apply set values if(background != null) control.setBackground(background); if(foreground != null) control.setForeground(foreground); } } else{ /...
else control.setFont(font);
public void applyFontsAndColors(TreeItem control) { if(colorProvider == null){ if(usedDecorators){ //If there is no provider only apply set values if(background != null) control.setBackground(background); if(foreground != null) control.setForeground(foreground); } } else{ /...
public void update(String propertyName) { if (widget != null) { boolean textChanged = propertyName == null || propertyName.equals(IAction.TEXT); boolean imageChanged = propertyName == null || propertyName.equals(IAction.IMAGE); boolean tooltipTextChanged = propertyName == null || propertyName.equals(IAction.TOOL_TIP_T...
public final void update() { update(null);
public void update(String propertyName) { if (widget != null) { // determine what to do boolean textChanged = propertyName == null || propertyName.equals(IAction.TEXT); boolean imageChanged = propertyName == null || propertyName.equals...
protected Action(String text, ImageDescriptor image) { this(); setText(text); setImageDescriptor(image);
protected Action() {
protected Action(String text, ImageDescriptor image) { this(); setText(text); setImageDescriptor(image);}
public PartInitException(IStatus status) { super(status);
public PartInitException(String message) { super(message);
public PartInitException(IStatus status) { super(status);}
public void add(Object parentElement, Object childElement) { add(parentElement, new Object[] { childElement });
public void add(Object parentElement, Object[] childElements) { Assert.isNotNull(parentElement); assertElementsNotNull(childElements); Widget widget = findItem(parentElement); if (widget == null) return; Control tree = getControl(); if (widget instanceof Item) { Item ti = (Item) widget; if (!getExpanded(ti)) { bo...
public void add(Object parentElement, Object childElement) { add(parentElement, new Object[] { childElement }); }
protected ChangeEvent fireChangeEvent(int changeType, Object oldValue, Object newValue, Object parent, int position) { ChangeEvent changeEvent = new ChangeEvent(this, changeType, oldValue, newValue, parent, position); if(changeListeners==null) { return changeEvent; } IChangeListener[] listeners = (IChangeListener[]) c...
protected final ChangeEvent fireChangeEvent(int changeType, Object oldValue, Object newValue) { return fireChangeEvent(changeType, oldValue, newValue, ChangeEvent.POSITION_UNKNOWN);
protected ChangeEvent fireChangeEvent(int changeType, Object oldValue, Object newValue, Object parent, int position) { ChangeEvent changeEvent = new ChangeEvent(this, changeType, oldValue, newValue, parent, position); if(changeListeners==null) { // disposed return changeEvent; } IChangeListener[] listeners...
protected void insertAfter(IContributionManager mgr, String refId, IContributionItem item) { mgr.insertAfter(refId, item);
protected void insertAfter(IContributionManager mgr, String refId, PluginAction action) { insertAfter(mgr, refId, new PluginActionContributionItem(action));
protected void insertAfter(IContributionManager mgr, String refId, IContributionItem item) { mgr.insertAfter(refId, item); }
public Accelerator(String id,int accelerator) { this(id,null,null,null); accelerators = new int[1][]; accelerators[0] = new int[]{accelerator};
public Accelerator(String id, String key, String locale, String platform) { this.id = id; this.key = key; this.locale = locale; this.platform = platform; if(locale==null) this.locale = DEFAULT_LOCALE; if(platform==null) this.platform = DEFAULT_PLATFORM;
public Accelerator(String id,int accelerator) { this(id,null,null,null); accelerators = new int[1][]; accelerators[0] = new int[]{accelerator}; }
public static KeyStroke getInstance(String string) throws ParseException { if (string == null)
public static KeyStroke getInstance(ModifierKey modifierKey, NaturalKey naturalKey) { if (modifierKey == null)
public static KeyStroke getInstance(String string) throws ParseException { if (string == null) throw new NullPointerException(); SortedSet modifierKeys = new TreeSet(); NaturalKey naturalKey = null; StringTokenizer stringTokenizer = new StringTokenizer(string, KEY_DELIMITERS, true); int i = 0; while (stringTok...
SortedSet modifierKeys = new TreeSet(); NaturalKey naturalKey = null; StringTokenizer stringTokenizer = new StringTokenizer(string, KEY_DELIMITERS, true); int i = 0; while (stringTokenizer.hasMoreTokens()) { String token = stringTokenizer.nextToken(); if (i % 2 == 0) { if (stringTokenizer.hasMoreTokens()) { token = t...
return new KeyStroke(new TreeSet(Collections.singletonList(modifierKey)), naturalKey);
public static KeyStroke getInstance(String string) throws ParseException { if (string == null) throw new NullPointerException(); SortedSet modifierKeys = new TreeSet(); NaturalKey naturalKey = null; StringTokenizer stringTokenizer = new StringTokenizer(string, KEY_DELIMITERS, true); int i = 0; while (stringTok...
public ImportResourcesAction(IWorkbench workbench) { this(workbench.getActiveWorkbenchWindow());
public ImportResourcesAction(IWorkbenchWindow window) { super(WorkbenchMessages.ImportResourcesAction_text); if (window == null) { throw new IllegalArgumentException(); } this.workbenchWindow = window; tracker = new PerspectiveTracker(window, this); setActionDefinitionId("org.eclipse.ui.file.import"); setToolTipText(Wo...
public ImportResourcesAction(IWorkbench workbench) { this(workbench.getActiveWorkbenchWindow()); }
public ExportResourcesAction(IWorkbench workbench) { this(workbench.getActiveWorkbenchWindow());
public ExportResourcesAction(IWorkbenchWindow window) { this(window, WorkbenchMessages.ExportResourcesAction_text);
public ExportResourcesAction(IWorkbench workbench) { this(workbench.getActiveWorkbenchWindow()); }
protected abstract void readINIFile(URL iniURL, URL propertiesURL) throws CoreException;
public void readINIFile() throws CoreException { IPlatformConfiguration conf = BootLoader.getCurrentPlatformConfiguration(); String configName = conf.getPrimaryFeatureIdentifier(); if (configName == null) { reportINIFailure(null, "Unknown configuration identifier"); return; } IPluginRegistry reg = Platform.getPlugin...
protected abstract void readINIFile(URL iniURL, URL propertiesURL) throws CoreException;
public ActionExpression(String expressionType, String expressionValue) { if (expressionType.equals(EXP_TYPE_OBJECT_CLASS)) { root = new SingleExpression(new ObjectClassExpression( expressionValue)); } }
public ActionExpression(IConfigurationElement element) { try { root = new SingleExpression(element); } catch (IllegalStateException e) { e.printStackTrace(); root = null; } }
public ActionExpression(String expressionType, String expressionValue) { if (expressionType.equals(EXP_TYPE_OBJECT_CLASS)) { root = new SingleExpression(new ObjectClassExpression( expressionValue)); } }
Object newValue, Object parent, int position) { super(source); this.oldValue = oldValue; this.changeType = changeType; this.newValue = newValue; this.parent = parent; this.position = position;
Object newValue) { this(source, changeType, oldValue, newValue, POSITION_UNKNOWN);
public ChangeEvent(Object source, int changeType, Object oldValue, Object newValue, Object parent, int position) { super(source); this.oldValue = oldValue; this.changeType = changeType; this.newValue = newValue; this.parent = parent; this.position = position; }
public WizardFileSystemResourceExportPage1(IStructuredSelection selection) { this("fileSystemExportPage1", selection); setTitle(DataTransferMessages.getString("DataTransfer.fileSystemTitle")); setDescription(DataTransferMessages.getString("FileExport.exportLocalFileSystem"));
protected WizardFileSystemResourceExportPage1(String name, IStructuredSelection selection) { super(name, selection);
public WizardFileSystemResourceExportPage1(IStructuredSelection selection) { this("fileSystemExportPage1", selection);//$NON-NLS-1$ setTitle(DataTransferMessages.getString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$ setDescription(DataTransferMessages.getString("FileExport.exportLocalFileSystem")); //$NON-NLS-1$}
public static String asString(Point value) { Assert.isNotNull(value); StringBuffer buffer = new StringBuffer(); buffer.append(value.x); buffer.append(','); buffer.append(value.y); return buffer.toString();
public static String asString(double value) { return String.valueOf(value);
public static String asString(Point value) { Assert.isNotNull(value); StringBuffer buffer = new StringBuffer(); buffer.append(value.x); buffer.append(','); buffer.append(value.y); return buffer.toString();}
public static final WorkbenchPreferenceDialog createDialogOn(final String preferencePageId, String[] displayedIds) { WorkbenchPreferenceDialog dialog = createDialogOn(null,preferencePageId); if(dialog == null) return null; if (displayedIds != null) dialog.showOnly(displayedIds); return dialog;
public static final WorkbenchPreferenceDialog createDialogOn(final String preferencePageId) { return createDialogOn(null,preferencePageId);
public static final WorkbenchPreferenceDialog createDialogOn(final String preferencePageId, String[] displayedIds) { WorkbenchPreferenceDialog dialog = createDialogOn(null,preferencePageId); if(dialog == null) return null; if (displayedIds != null) dialog.showOnly(displayedIds); return dialog; }
public void add(int index, Object element) { wrappedList.add(index, element); fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index, true, element)));
public boolean add(Object element) { getterCalled(); boolean added = wrappedList.add(element); if (added) { fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry( wrappedList.size() - 1, true, element))); } return added;
public void add(int index, Object element) { wrappedList.add(index, element); fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index, true, element))); }
public WorkbenchPreferenceNode(String nodeId, String nodeLabel, String category, ImageDescriptor nodeImage, IWorkbenchPreferencePage preferencePage) {
public WorkbenchPreferenceNode(String nodeId, String nodeLabel, String category, ImageDescriptor nodeImage, IConfigurationElement element, IWorkbench newWorkbench) {
public WorkbenchPreferenceNode(String nodeId, String nodeLabel, String category, ImageDescriptor nodeImage, IWorkbenchPreferencePage preferencePage) { super(nodeId, nodeLabel, nodeImage, null); setPage(preferencePage);}
setPage(preferencePage);
this.category = category; this.configurationElement = element; this.workbench = newWorkbench;
public WorkbenchPreferenceNode(String nodeId, String nodeLabel, String category, ImageDescriptor nodeImage, IWorkbenchPreferencePage preferencePage) { super(nodeId, nodeLabel, nodeImage, null); setPage(preferencePage);}
if (appName == null) appName = getAppName(product);
if (appName == null) { appName = getAppName(product); }
public String getAppName() { if (appName == null) appName = getAppName(product); return appName; }
if (windowImageDescriptors == null) windowImageDescriptors = getWindowImages(product);
if (windowImageDescriptors == null) { windowImageDescriptors = getWindowImages(product); }
public ImageDescriptor[] getWindowImages() { if (windowImageDescriptors == null) windowImageDescriptors = getWindowImages(product); return windowImageDescriptors; }
public static MarkerList compute(MarkerFilter filter, IProgressMonitor mon,
public static MarkerList compute(MarkerFilter[] filters, IProgressMonitor mon,
public static MarkerList compute(MarkerFilter filter, IProgressMonitor mon, boolean ignoreExceptions) throws CoreException { return new MarkerList(filter.findMarkers(mon, ignoreExceptions)); }
return new MarkerList(filter.findMarkers(mon, ignoreExceptions));
Collection returnMarkers = new ArrayList(); for (int i = 0; i < filters.length; i++) { returnMarkers.addAll(filters[i].findMarkers(mon, ignoreExceptions)); } return new MarkerList(returnMarkers);
public static MarkerList compute(MarkerFilter filter, IProgressMonitor mon, boolean ignoreExceptions) throws CoreException { return new MarkerList(filter.findMarkers(mon, ignoreExceptions)); }
public List getEnabledContentDescriptors(Object anElement, NavigatorViewerDescriptor aViewerDescriptor) { List descriptors = new ArrayList();
public Set getEnabledContentDescriptors(Object anElement) { Set descriptors = new HashSet();
public List getEnabledContentDescriptors(Object anElement, NavigatorViewerDescriptor aViewerDescriptor) { List descriptors = new ArrayList(); /* Find other ContentProviders which enable for this object */ for (Iterator contentDescriptorsItr = contentDescriptors.values().iterator(); contentDescriptorsItr.hasNext();)...
if (NAVIGATOR_ACTIVATION_SERVICE.isNavigatorExtensionActive(aViewerDescriptor.getViewerId(), descriptor.getId()) && !aViewerDescriptor.filtersContentDescriptor(descriptor)) { if (descriptor.isEnabledFor(anElement)) descriptors.add(descriptor); }
if (descriptor.isEnabledFor(anElement)) descriptors.add(descriptor);
public List getEnabledContentDescriptors(Object anElement, NavigatorViewerDescriptor aViewerDescriptor) { List descriptors = new ArrayList(); /* Find other ContentProviders which enable for this object */ for (Iterator contentDescriptorsItr = contentDescriptors.values().iterator(); contentDescriptorsItr.hasNext();)...
Collections.sort(descriptors, EXTENSION_COMPARATOR);
public List getEnabledContentDescriptors(Object anElement, NavigatorViewerDescriptor aViewerDescriptor) { List descriptors = new ArrayList(); /* Find other ContentProviders which enable for this object */ for (Iterator contentDescriptorsItr = contentDescriptors.values().iterator(); contentDescriptorsItr.hasNext();)...
return Collections.unmodifiableList(descriptors);
return descriptors;
public List getEnabledContentDescriptors(Object anElement, NavigatorViewerDescriptor aViewerDescriptor) { List descriptors = new ArrayList(); /* Find other ContentProviders which enable for this object */ for (Iterator contentDescriptorsItr = contentDescriptors.values().iterator(); contentDescriptorsItr.hasNext();)...
public void applyFontsAndColors(TableTreeItem control) {
public void applyFontsAndColors(TableItem control) {
public void applyFontsAndColors(TableTreeItem control) { if(colorProvider == null){ if(usedDecorators){ //If there is no provider only apply set values if(background != null) control.setBackground(background); if(foreground != null) control.setForeground(foreground); } } else{...
public DynamicHelpAction(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } this.workbenchWindow = window; setActionDefinitionId("org.eclipse.ui.help.dynamicHelp"); String overrideText = PrefUtil.getAPIPreferenceStore().getString( IWorkbenchPreferenceConstants.DYNAMIC_HELP_ACTION...
public DynamicHelpAction() { this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
public DynamicHelpAction(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } this.workbenchWindow = window; setActionDefinitionId("org.eclipse.ui.help.dynamicHelp"); //$NON-NLS-1$ // support for allowing a product to override the text for the action String overrideText = Pr...
} else { throw e;
private List findMarkers(IResource[] resources, int depth, int limit, IProgressMonitor mon, boolean ignoreExceptions) throws CoreException { if (resources == null) { return Collections.EMPTY_LIST; } List resultList = new ArrayList(resources.length * 2); // Optimization: if a type appears in the selectedTypes...
throw e;
private List findMarkers(IResource[] resources, int depth, int limit, IProgressMonitor mon, boolean ignoreExceptions) throws CoreException { if (resources == null) { return Collections.EMPTY_LIST; } List resultList = new ArrayList(resources.length * 2); // Optimization: if a type appears in the selectedTypes...