rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
aimSn, icqSn, msnSn, ymSn, contact.getJobTitle(), null, null);
aimSn, icqSn, msnSn, ymSn, contact.getJobTitle(), user.getOrganization().getOrganizationId(), user.getLocation().getOrganizationId());
public static User updateUser( HttpServletRequest req, String userId, String emailAddress, String languageId, String timeZoneId, String greeting, String resolution, String comments, String smsSn, String aimSn, String icqSn, String msnSn, String ymSn) throws PortalException, SystemException { String password = getUpdateUserPassword(req, userId); User user = UserLocalServiceUtil.getUserById(userId); Contact contact = user.getContact(); Calendar birthdayCal = new GregorianCalendar(); birthdayCal.setTime(contact.getBirthday()); int birthdayMonth = birthdayCal.get(Calendar.MONTH); int birthdayDay = birthdayCal.get(Calendar.DATE); int birthdayYear = birthdayCal.get(Calendar.YEAR); return UserServiceUtil.updateUser( userId, password, emailAddress, languageId, timeZoneId, greeting, resolution, comments, contact.getFirstName(), contact.getMiddleName(), contact.getLastName(), contact.getNickName(), contact.getPrefixId(), contact.getSuffixId(), contact.isMale(), birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn, icqSn, msnSn, ymSn, contact.getJobTitle(), null, null); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f3ad9fb1651cda52873ea772c3df0bb9bd03b52f/AdminUtil.java/clean/portal-ejb/src/com/liferay/portlet/admin/util/AdminUtil.java
this.background = parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
public void createControl(Composite parent) { this.background = parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); // Canvas to show the image. imageCanvas = new Canvas(parent, SWT.NONE); imageCanvas.setBackground( parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); imageCanvas.setToolTipText(ProgressMessages.getString("AnimationItem.HoverHelp")); //$NON-NLS-1$ imageCanvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent event) { paintImage(event, getImage(), getImageData()[0]); } }); imageCanvasGC = new GC(imageCanvas); imageCanvas.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { imageCanvasGC.dispose(); } }); imageCanvas.addMouseListener(new MouseListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent) */ public void mouseDoubleClick(MouseEvent arg0) { ProgressUtil.openProgressView(window); } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent) */ public void mouseDown(MouseEvent arg0) { } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent) */ public void mouseUp(MouseEvent arg0) { } }); imageCanvas .getAccessible() .addAccessibleControlListener(new AccessibleControlAdapter() { /* (non-Javadoc) * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(org.eclipse.swt.accessibility.AccessibleControlEvent) */ public void getValue(AccessibleControlEvent arg0) { if (animated) arg0.result = ProgressMessages.getString("AnimationItem.InProgressStatus"); //$NON-NLS-1$ else arg0.result = ProgressMessages.getString("AnimationItem.NotRunningStatus"); //$NON-NLS-1$ } }); imageCanvas.addHelpListener(new HelpListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.HelpListener#helpRequested(org.eclipse.swt.events.HelpEvent) */ public void helpRequested(HelpEvent e) { // XXX Auto-generated method stub } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7225000c3d838bed4621bef6e5e44e099e80df1d/AnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
paintImage(event, getImage(), getImageData()[0]);
paintImage(event, manager.getImage(), manager.getImageData()[0]);
public void createControl(Composite parent) { this.background = parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); // Canvas to show the image. imageCanvas = new Canvas(parent, SWT.NONE); imageCanvas.setBackground( parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); imageCanvas.setToolTipText(ProgressMessages.getString("AnimationItem.HoverHelp")); //$NON-NLS-1$ imageCanvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent event) { paintImage(event, getImage(), getImageData()[0]); } }); imageCanvasGC = new GC(imageCanvas); imageCanvas.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { imageCanvasGC.dispose(); } }); imageCanvas.addMouseListener(new MouseListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent) */ public void mouseDoubleClick(MouseEvent arg0) { ProgressUtil.openProgressView(window); } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent) */ public void mouseDown(MouseEvent arg0) { } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent) */ public void mouseUp(MouseEvent arg0) { } }); imageCanvas .getAccessible() .addAccessibleControlListener(new AccessibleControlAdapter() { /* (non-Javadoc) * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(org.eclipse.swt.accessibility.AccessibleControlEvent) */ public void getValue(AccessibleControlEvent arg0) { if (animated) arg0.result = ProgressMessages.getString("AnimationItem.InProgressStatus"); //$NON-NLS-1$ else arg0.result = ProgressMessages.getString("AnimationItem.NotRunningStatus"); //$NON-NLS-1$ } }); imageCanvas.addHelpListener(new HelpListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.HelpListener#helpRequested(org.eclipse.swt.events.HelpEvent) */ public void helpRequested(HelpEvent e) { // XXX Auto-generated method stub } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7225000c3d838bed4621bef6e5e44e099e80df1d/AnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
if (animated)
if (manager.isAnimated())
public void createControl(Composite parent) { this.background = parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); // Canvas to show the image. imageCanvas = new Canvas(parent, SWT.NONE); imageCanvas.setBackground( parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); imageCanvas.setToolTipText(ProgressMessages.getString("AnimationItem.HoverHelp")); //$NON-NLS-1$ imageCanvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent event) { paintImage(event, getImage(), getImageData()[0]); } }); imageCanvasGC = new GC(imageCanvas); imageCanvas.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { imageCanvasGC.dispose(); } }); imageCanvas.addMouseListener(new MouseListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent) */ public void mouseDoubleClick(MouseEvent arg0) { ProgressUtil.openProgressView(window); } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent) */ public void mouseDown(MouseEvent arg0) { } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent) */ public void mouseUp(MouseEvent arg0) { } }); imageCanvas .getAccessible() .addAccessibleControlListener(new AccessibleControlAdapter() { /* (non-Javadoc) * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(org.eclipse.swt.accessibility.AccessibleControlEvent) */ public void getValue(AccessibleControlEvent arg0) { if (animated) arg0.result = ProgressMessages.getString("AnimationItem.InProgressStatus"); //$NON-NLS-1$ else arg0.result = ProgressMessages.getString("AnimationItem.NotRunningStatus"); //$NON-NLS-1$ } }); imageCanvas.addHelpListener(new HelpListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.HelpListener#helpRequested(org.eclipse.swt.events.HelpEvent) */ public void helpRequested(HelpEvent e) { // XXX Auto-generated method stub } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7225000c3d838bed4621bef6e5e44e099e80df1d/AnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
manager.addItem(this);
public void createControl(Composite parent) { this.background = parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); // Canvas to show the image. imageCanvas = new Canvas(parent, SWT.NONE); imageCanvas.setBackground( parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); imageCanvas.setToolTipText(ProgressMessages.getString("AnimationItem.HoverHelp")); //$NON-NLS-1$ imageCanvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent event) { paintImage(event, getImage(), getImageData()[0]); } }); imageCanvasGC = new GC(imageCanvas); imageCanvas.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { imageCanvasGC.dispose(); } }); imageCanvas.addMouseListener(new MouseListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent) */ public void mouseDoubleClick(MouseEvent arg0) { ProgressUtil.openProgressView(window); } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent) */ public void mouseDown(MouseEvent arg0) { } /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent) */ public void mouseUp(MouseEvent arg0) { } }); imageCanvas .getAccessible() .addAccessibleControlListener(new AccessibleControlAdapter() { /* (non-Javadoc) * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getValue(org.eclipse.swt.accessibility.AccessibleControlEvent) */ public void getValue(AccessibleControlEvent arg0) { if (animated) arg0.result = ProgressMessages.getString("AnimationItem.InProgressStatus"); //$NON-NLS-1$ else arg0.result = ProgressMessages.getString("AnimationItem.NotRunningStatus"); //$NON-NLS-1$ } }); imageCanvas.addHelpListener(new HelpListener() { /* (non-Javadoc) * @see org.eclipse.swt.events.HelpListener#helpRequested(org.eclipse.swt.events.HelpEvent) */ public void helpRequested(HelpEvent e) { // XXX Auto-generated method stub } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7225000c3d838bed4621bef6e5e44e099e80df1d/AnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
paintImage(event, getImage(), getImageData()[0]);
paintImage(event, manager.getImage(), manager.getImageData()[0]);
public void paintControl(PaintEvent event) { paintImage(event, getImage(), getImageData()[0]); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7225000c3d838bed4621bef6e5e44e099e80df1d/AnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
if (animated)
if (manager.isAnimated())
public void getValue(AccessibleControlEvent arg0) { if (animated) arg0.result = ProgressMessages.getString("AnimationItem.InProgressStatus"); //$NON-NLS-1$ else arg0.result = ProgressMessages.getString("AnimationItem.NotRunningStatus"); //$NON-NLS-1$ }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7225000c3d838bed4621bef6e5e44e099e80df1d/AnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
if ((!block.auto_height && !parent.auto_height) || (!block.auto_width && !block.auto_width) || (block.absolute || block.fixed || block.floated || block.relative)) {
if ((!block.getStyle().isAutoHeight() && !parent.getStyle().isAutoHeight()) || (!block.getStyle().isAutoWidth() && !parent.getStyle().isAutoWidth()) || (block.getStyle().isPostionedOrFloated())) {
public static void checkExceeds(Box block) { Box parent = block.getParent(); if (parent != null) { // FIXME Not right, for example // <div style="height: 3in; width: 1in;"> // <div> // <div style="height 5in; width: 1in;"> // </div> // </div> // </div> // but OK for most situations if ((!block.auto_height && !parent.auto_height) || (!block.auto_width && !block.auto_width) || (block.absolute || block.fixed || block.floated || block.relative)) { parent.setChildrenExceedBounds(true); } } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/d78edbe00854320b48eb4ef97095b253df533dd8/Boxing.java/buggy/src/java/org/xhtmlrenderer/layout/Boxing.java
block.setMarginTopOverride(0f);
block.getStyle().setMarginTopOverride(0f);
private static void checkPageBreakBefore(Context c, Box block) { if (c.isPrint()) { if ((c.isPendingPageBreak() || c.getCurrentStyle().propertyByName(CSSName.PAGE_BREAK_BEFORE).isIdent(IdentValue.ALWAYS))) { block.moveToNextPage(c, false); block.setMarginTopOverride(0f); } c.setPendingPageBreak(false); } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/d78edbe00854320b48eb4ef97095b253df533dd8/Boxing.java/buggy/src/java/org/xhtmlrenderer/layout/Boxing.java
addTest(new TestSuite(MultiThreadedOperationsTests.class));
public OperationsTestSuite() { addTest(new TestSuite(OperationsAPITest.class)); addTest(new TestSuite(WorkbenchOperationHistoryTests.class)); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/414a2d09fb26016ff5df26cdbcb7ec32656f7ea3/OperationsTestSuite.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/operations/OperationsTestSuite.java
return JavaUtil.convertJavaToRuby(ruby, proc.call(JavaUtil.convertJavaToRuby(ruby, args)));
return JavaUtil.convertJavaToRuby(ruby, proc.call(JavaUtil.convertJavaArrayToRuby(ruby, args)));
public static RubyJavaInterface newJavaInterface(final Ruby ruby, final Method interfaceMethod, final RubyProc proc) { return new RubyJavaInterface(ruby, Proxy.newProxyInstance(null, new Class[]{interfaceMethod.getDeclaringClass()}, new InvocationHandler() { public Object invoke(Object recv, Method imethod, Object[] args) { return JavaUtil.convertJavaToRuby(ruby, proc.call(JavaUtil.convertJavaToRuby(ruby, args))); } })); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a526b01cbfccc8f939ebe1c3b73363469a0bfd5/RubyJavaInterface.java/clean/org/jruby/RubyJavaInterface.java
return JavaUtil.convertJavaToRuby(ruby, proc.call(JavaUtil.convertJavaToRuby(ruby, args)));
return JavaUtil.convertJavaToRuby(ruby, proc.call(JavaUtil.convertJavaArrayToRuby(ruby, args)));
public Object invoke(Object recv, Method imethod, Object[] args) { return JavaUtil.convertJavaToRuby(ruby, proc.call(JavaUtil.convertJavaToRuby(ruby, args))); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a526b01cbfccc8f939ebe1c3b73363469a0bfd5/RubyJavaInterface.java/clean/org/jruby/RubyJavaInterface.java
return JavaUtil.convertJavaToRuby(ruby, method.call(JavaUtil.convertJavaToRuby(ruby, args)));
return JavaUtil.convertJavaToRuby(ruby, method.call(JavaUtil.convertJavaArrayToRuby(ruby, args)));
public Object invoke(Object recv, Method imethod, Object[] args) { return JavaUtil.convertJavaToRuby(ruby, method.call(JavaUtil.convertJavaToRuby(ruby, args))); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a526b01cbfccc8f939ebe1c3b73363469a0bfd5/RubyJavaInterface.java/clean/org/jruby/RubyJavaInterface.java
return JavaUtil.convertJavaToRuby(ruby, receiver.send(method, JavaUtil.convertJavaToRuby(ruby, args)), imethod.getReturnType());
return JavaUtil.convertJavaToRuby(ruby, receiver.send(method, JavaUtil.convertJavaArrayToRuby(ruby, args)));
public Object invoke(Object recv, Method imethod, Object[] args) { return JavaUtil.convertJavaToRuby(ruby, receiver.send(method, JavaUtil.convertJavaToRuby(ruby, args)), imethod.getReturnType()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a526b01cbfccc8f939ebe1c3b73363469a0bfd5/RubyJavaInterface.java/clean/org/jruby/RubyJavaInterface.java
return JavaUtil.convertJavaToRuby(ruby, receiver.send(RubyString.newString(ruby, method.getName()), JavaUtil.convertJavaToRuby(ruby, args)), method.getReturnType());
return JavaUtil.convertJavaToRuby(ruby, receiver.send(RubyString.newString(ruby, method.getName()), JavaUtil.convertJavaArrayToRuby(ruby, args)));
public Object invoke(Object recv, Method method, Object[] args) { return JavaUtil.convertJavaToRuby(ruby, receiver.send(RubyString.newString(ruby, method.getName()), JavaUtil.convertJavaToRuby(ruby, args)), method.getReturnType()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a526b01cbfccc8f939ebe1c3b73363469a0bfd5/RubyJavaInterface.java/clean/org/jruby/RubyJavaInterface.java
} infos.add(info);
} else infos.add(info);
private List getStylesheets() { List infos = new LinkedList(); long st = System.currentTimeMillis(); String uri = _nsh.getNamespace(); StylesheetInfo info = new StylesheetInfo(); info.setUri(_nsh.getNamespace()); info.setOrigin(StylesheetInfo.USER_AGENT); info.setMedia("all"); info.setType("text/css"); if (!_stylesheetFactory.containsStylesheet(uri)) { java.io.InputStream stream = _nsh.getDefaultStylesheet(); if (stream != null) { Stylesheet sheet = _stylesheetFactory.parse(stream, info); _stylesheetFactory.putStylesheet(uri, sheet); } } infos.add(info); StylesheetInfo[] refs = _nsh.getStylesheetLinks(_doc); if (refs != null) { for (int i = 0; i < refs.length; i++) { uri = _uac.resolveURI(refs[i].getUri()); refs[i].setUri(uri); } } infos.addAll(Arrays.asList(refs)); uri = _uac.getBaseURL(); info = new StylesheetInfo(); info.setUri(uri); info.setOrigin(StylesheetInfo.AUTHOR); Stylesheet sheet = null; if (_stylesheetFactory.containsStylesheet(uri)) { sheet = _stylesheetFactory.getCachedStylesheet(uri); } else { InlineStyleInfo[] inlineStyle = _nsh.getInlineStyle(_doc); sheet = _stylesheetFactory.parseInlines(inlineStyle, info); _stylesheetFactory.putStylesheet(uri, sheet); } info.setStylesheet(sheet);//add it here because matcher cannot look it up, uri:s are in a twist infos.add(info); // TODO: here we should also get user stylesheet from userAgent long el = System.currentTimeMillis() - st; XRLog.load("TIME: parse stylesheets " + el + "ms"); return infos; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/7f7005e11a31afbcc86d2565f1b178ee8a5fe6fa/StyleReference.java/buggy/src/java/org/xhtmlrenderer/context/StyleReference.java
is = new URL(resolveURI(uri)).openStream();
is = new URL(uri).openStream();
public Image getImage(String uri) { java.io.InputStream is = null; Image img = null; if (imageCache != null) { SoftReference ref = (SoftReference) imageCache.get(uri); if (ref != null) { img = (Image) ref.get(); } if (img != null) { return img; } } try { is = new URL(resolveURI(uri)).openStream(); } catch (FileNotFoundException ex) { XRLog.exception("Can't find image file for URI: '" + uri + "'; skipping."); } catch (java.net.MalformedURLException e) { XRLog.exception("Bad URI given for image file: '" + uri + "'"); } catch (java.io.IOException e) { XRLog.exception("Can't load image file; IO problem for URI '" + uri + "'", e); } if (is != null) { try { img = ImageIO.read(is); if (imageCache == null) { imageCache = new HashMap(); } imageCache.put(uri, new SoftReference(img)); } catch (Exception e) { XRLog.exception("Can't read image file; unexpected problem for URI '" + uri + "'", e); } } return img; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1b52358d30f82d3530375ae74bb10b75919f76e7/NaiveUserAgent.java/clean/src/java/org/xhtmlrenderer/swing/NaiveUserAgent.java
is = new URL(resolveURI(uri)).openStream();
is = new URL(uri).openStream();
public java.io.Reader getReader(String uri) { java.io.InputStream is = null; Reader reader = null; try { is = new URL(resolveURI(uri)).openStream(); reader = new BufferedReader(new java.io.InputStreamReader(is)); } catch (java.net.MalformedURLException e) { XRLog.exception("bad URL given: " + uri, e); } catch (java.io.IOException e) { XRLog.exception("IO problem for " + uri, e); } return reader; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1b52358d30f82d3530375ae74bb10b75919f76e7/NaiveUserAgent.java/clean/src/java/org/xhtmlrenderer/swing/NaiveUserAgent.java
Font font = FontUtil.getFont(c, style, box.getNode());
Font font = FontUtil.getFont(c, style);
private static void drawText(Context c, Box box, String type) { String text = ""; if (type.equals("decimal")) { text = box.list_count + "."; } if (type.equals("lower-latin")) { text = toLatin(box.list_count).toLowerCase() + "."; } if (type.equals("upper-latin")) { text = toLatin(box.list_count).toUpperCase() + "."; } if (type.equals("lower-roman")) { text = toRoman(box.list_count).toLowerCase() + "."; } if (type.equals("upper-roman")) { text = toRoman(box.list_count).toUpperCase() + "."; } CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); LineMetrics lm = font.getLineMetrics(text, ((Graphics2D) c.getGraphics()).getFontRenderContext()); int w = FontUtil.len(c, text, font); int h = FontUtil.lineHeight(c, box.getRealElement()); int x = box.x - w - 2; int y = box.y + h; y -= (int) lm.getDescent(); c.getGraphics().setFont(font); c.getGraphics().drawString(text, x, y); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
int h = FontUtil.lineHeight(c, box.getRealElement());
int h = FontUtil.lineHeight(c, style);
private static void drawText(Context c, Box box, String type) { String text = ""; if (type.equals("decimal")) { text = box.list_count + "."; } if (type.equals("lower-latin")) { text = toLatin(box.list_count).toLowerCase() + "."; } if (type.equals("upper-latin")) { text = toLatin(box.list_count).toUpperCase() + "."; } if (type.equals("lower-roman")) { text = toRoman(box.list_count).toLowerCase() + "."; } if (type.equals("upper-roman")) { text = toRoman(box.list_count).toUpperCase() + "."; } CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); LineMetrics lm = font.getLineMetrics(text, ((Graphics2D) c.getGraphics()).getFontRenderContext()); int w = FontUtil.len(c, text, font); int h = FontUtil.lineHeight(c, box.getRealElement()); int x = box.x - w - 2; int y = box.y + h; y -= (int) lm.getDescent(); c.getGraphics().setFont(font); c.getGraphics().drawString(text, x, y); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
RenderingHints.VALUE_ANTIALIAS_ON);
RenderingHints.VALUE_ANTIALIAS_ON);
public static void paint(Context c, Box box) { String type = c.css.getStyle(box.getNode()).getStringProperty("list-style-type"); if (type.equals("none")) { return; } if (type.equals("lower-greek")) { type = "decimal"; } if (type.equals("decimal-leading-zero")) { type = "decimal"; } String image = c.css.getStyle(box.getNode()).getStringProperty("list-style-image"); Image img = null; if (!image.equals("none")) { try { //u.p("loading: " + image); img = ImageUtil.loadImage(c, image); } catch (Exception ex) { u.p(ex); } //u.p("image = " + img); if (img != null) { int rad = 8; int baseline = box.height; c.getGraphics().drawImage(img, box.x - img.getWidth(null) - 2, box.y + baseline / 2 - img.getHeight(null) / 2 + 2, null); return; } } // prep the color box.color = c.css.getStyle(box.getRealElement()).getColor(); c.getGraphics().setColor(box.color); // save the old AntiAliasing setting, then force it on Object aa_key = c.getGraphics().getRenderingHint(RenderingHints.KEY_ANTIALIASING); c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // calculations for bullets int rad = 8;// change this to use the glyph height int baseline = box.height;// change this to use the real baseline CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); //Font font = FontUtil.getFont(c, box.getRealElement()); int h = FontUtil.lineHeight(c, box.getRealElement()); rad = h / 3; int x = box.x - rad - rad / 2; int y = box.y + (h - rad / 2) / 2; if (type.equals("disc")) { c.getGraphics().fillOval(x, y, rad, rad); return; } if (type.equals("square")) { c.getGraphics().fillRect(x, y, rad, rad); return; } if (type.equals("circle")) { c.getGraphics().drawOval(x, y, rad, rad); return; } // restore the old AntiAliasing setting c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, aa_key); // calculations for text if (type.equals("decimal")) { drawText(c, box, type); return; } if (type.equals("lower-latin")) { drawText(c, box, type); return; } if (type.equals("upper-latin")) { drawText(c, box, type); return; } if (type.equals("lower-roman")) { drawText(c, box, type); return; } if (type.equals("upper-roman")) { drawText(c, box, type); return; } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
int baseline = box.height;
public static void paint(Context c, Box box) { String type = c.css.getStyle(box.getNode()).getStringProperty("list-style-type"); if (type.equals("none")) { return; } if (type.equals("lower-greek")) { type = "decimal"; } if (type.equals("decimal-leading-zero")) { type = "decimal"; } String image = c.css.getStyle(box.getNode()).getStringProperty("list-style-image"); Image img = null; if (!image.equals("none")) { try { //u.p("loading: " + image); img = ImageUtil.loadImage(c, image); } catch (Exception ex) { u.p(ex); } //u.p("image = " + img); if (img != null) { int rad = 8; int baseline = box.height; c.getGraphics().drawImage(img, box.x - img.getWidth(null) - 2, box.y + baseline / 2 - img.getHeight(null) / 2 + 2, null); return; } } // prep the color box.color = c.css.getStyle(box.getRealElement()).getColor(); c.getGraphics().setColor(box.color); // save the old AntiAliasing setting, then force it on Object aa_key = c.getGraphics().getRenderingHint(RenderingHints.KEY_ANTIALIASING); c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // calculations for bullets int rad = 8;// change this to use the glyph height int baseline = box.height;// change this to use the real baseline CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); //Font font = FontUtil.getFont(c, box.getRealElement()); int h = FontUtil.lineHeight(c, box.getRealElement()); rad = h / 3; int x = box.x - rad - rad / 2; int y = box.y + (h - rad / 2) / 2; if (type.equals("disc")) { c.getGraphics().fillOval(x, y, rad, rad); return; } if (type.equals("square")) { c.getGraphics().fillRect(x, y, rad, rad); return; } if (type.equals("circle")) { c.getGraphics().drawOval(x, y, rad, rad); return; } // restore the old AntiAliasing setting c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, aa_key); // calculations for text if (type.equals("decimal")) { drawText(c, box, type); return; } if (type.equals("lower-latin")) { drawText(c, box, type); return; } if (type.equals("upper-latin")) { drawText(c, box, type); return; } if (type.equals("lower-roman")) { drawText(c, box, type); return; } if (type.equals("upper-roman")) { drawText(c, box, type); return; } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
Font font = FontUtil.getFont(c, style, box.getNode());
public static void paint(Context c, Box box) { String type = c.css.getStyle(box.getNode()).getStringProperty("list-style-type"); if (type.equals("none")) { return; } if (type.equals("lower-greek")) { type = "decimal"; } if (type.equals("decimal-leading-zero")) { type = "decimal"; } String image = c.css.getStyle(box.getNode()).getStringProperty("list-style-image"); Image img = null; if (!image.equals("none")) { try { //u.p("loading: " + image); img = ImageUtil.loadImage(c, image); } catch (Exception ex) { u.p(ex); } //u.p("image = " + img); if (img != null) { int rad = 8; int baseline = box.height; c.getGraphics().drawImage(img, box.x - img.getWidth(null) - 2, box.y + baseline / 2 - img.getHeight(null) / 2 + 2, null); return; } } // prep the color box.color = c.css.getStyle(box.getRealElement()).getColor(); c.getGraphics().setColor(box.color); // save the old AntiAliasing setting, then force it on Object aa_key = c.getGraphics().getRenderingHint(RenderingHints.KEY_ANTIALIASING); c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // calculations for bullets int rad = 8;// change this to use the glyph height int baseline = box.height;// change this to use the real baseline CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); //Font font = FontUtil.getFont(c, box.getRealElement()); int h = FontUtil.lineHeight(c, box.getRealElement()); rad = h / 3; int x = box.x - rad - rad / 2; int y = box.y + (h - rad / 2) / 2; if (type.equals("disc")) { c.getGraphics().fillOval(x, y, rad, rad); return; } if (type.equals("square")) { c.getGraphics().fillRect(x, y, rad, rad); return; } if (type.equals("circle")) { c.getGraphics().drawOval(x, y, rad, rad); return; } // restore the old AntiAliasing setting c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, aa_key); // calculations for text if (type.equals("decimal")) { drawText(c, box, type); return; } if (type.equals("lower-latin")) { drawText(c, box, type); return; } if (type.equals("upper-latin")) { drawText(c, box, type); return; } if (type.equals("lower-roman")) { drawText(c, box, type); return; } if (type.equals("upper-roman")) { drawText(c, box, type); return; } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
int h = FontUtil.lineHeight(c, box.getRealElement());
int h = FontUtil.lineHeight(c, style);
public static void paint(Context c, Box box) { String type = c.css.getStyle(box.getNode()).getStringProperty("list-style-type"); if (type.equals("none")) { return; } if (type.equals("lower-greek")) { type = "decimal"; } if (type.equals("decimal-leading-zero")) { type = "decimal"; } String image = c.css.getStyle(box.getNode()).getStringProperty("list-style-image"); Image img = null; if (!image.equals("none")) { try { //u.p("loading: " + image); img = ImageUtil.loadImage(c, image); } catch (Exception ex) { u.p(ex); } //u.p("image = " + img); if (img != null) { int rad = 8; int baseline = box.height; c.getGraphics().drawImage(img, box.x - img.getWidth(null) - 2, box.y + baseline / 2 - img.getHeight(null) / 2 + 2, null); return; } } // prep the color box.color = c.css.getStyle(box.getRealElement()).getColor(); c.getGraphics().setColor(box.color); // save the old AntiAliasing setting, then force it on Object aa_key = c.getGraphics().getRenderingHint(RenderingHints.KEY_ANTIALIASING); c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // calculations for bullets int rad = 8;// change this to use the glyph height int baseline = box.height;// change this to use the real baseline CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); //Font font = FontUtil.getFont(c, box.getRealElement()); int h = FontUtil.lineHeight(c, box.getRealElement()); rad = h / 3; int x = box.x - rad - rad / 2; int y = box.y + (h - rad / 2) / 2; if (type.equals("disc")) { c.getGraphics().fillOval(x, y, rad, rad); return; } if (type.equals("square")) { c.getGraphics().fillRect(x, y, rad, rad); return; } if (type.equals("circle")) { c.getGraphics().drawOval(x, y, rad, rad); return; } // restore the old AntiAliasing setting c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, aa_key); // calculations for text if (type.equals("decimal")) { drawText(c, box, type); return; } if (type.equals("lower-latin")) { drawText(c, box, type); return; } if (type.equals("upper-latin")) { drawText(c, box, type); return; } if (type.equals("lower-roman")) { drawText(c, box, type); return; } if (type.equals("upper-roman")) { drawText(c, box, type); return; } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
aa_key);
aa_key);
public static void paint(Context c, Box box) { String type = c.css.getStyle(box.getNode()).getStringProperty("list-style-type"); if (type.equals("none")) { return; } if (type.equals("lower-greek")) { type = "decimal"; } if (type.equals("decimal-leading-zero")) { type = "decimal"; } String image = c.css.getStyle(box.getNode()).getStringProperty("list-style-image"); Image img = null; if (!image.equals("none")) { try { //u.p("loading: " + image); img = ImageUtil.loadImage(c, image); } catch (Exception ex) { u.p(ex); } //u.p("image = " + img); if (img != null) { int rad = 8; int baseline = box.height; c.getGraphics().drawImage(img, box.x - img.getWidth(null) - 2, box.y + baseline / 2 - img.getHeight(null) / 2 + 2, null); return; } } // prep the color box.color = c.css.getStyle(box.getRealElement()).getColor(); c.getGraphics().setColor(box.color); // save the old AntiAliasing setting, then force it on Object aa_key = c.getGraphics().getRenderingHint(RenderingHints.KEY_ANTIALIASING); c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // calculations for bullets int rad = 8;// change this to use the glyph height int baseline = box.height;// change this to use the real baseline CalculatedStyle style = c.css.getStyle(box.getRealElement()); Font font = FontUtil.getFont(c, style, box.getNode()); //Font font = FontUtil.getFont(c, box.getRealElement()); int h = FontUtil.lineHeight(c, box.getRealElement()); rad = h / 3; int x = box.x - rad - rad / 2; int y = box.y + (h - rad / 2) / 2; if (type.equals("disc")) { c.getGraphics().fillOval(x, y, rad, rad); return; } if (type.equals("square")) { c.getGraphics().fillRect(x, y, rad, rad); return; } if (type.equals("circle")) { c.getGraphics().drawOval(x, y, rad, rad); return; } // restore the old AntiAliasing setting c.getGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, aa_key); // calculations for text if (type.equals("decimal")) { drawText(c, box, type); return; } if (type.equals("lower-latin")) { drawText(c, box, type); return; } if (type.equals("upper-latin")) { drawText(c, box, type); return; } if (type.equals("lower-roman")) { drawText(c, box, type); return; } if (type.equals("upper-roman")) { drawText(c, box, type); return; } }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/ListItemPainter.java/clean/src/java/org/xhtmlrenderer/render/ListItemPainter.java
ExtensionFilterViewerRegistry filterRegistry = ExtensionFilterRegistryManager.getInstance().getViewerRegistry(contentService.getViewerId()); List results = new ArrayList(); INavigatorContentDescriptor[] descriptors = CONTENT_DESCRIPTOR_REGISTRY.getAllContentDescriptors(); for (int i = 0; i < descriptors.length; i++) if (Utilities.isActive(contentService .getViewerDescriptor(), descriptors[i]) && Utilities.isVisible(contentService .getViewerDescriptor(), descriptors[i])) results.addAll(Arrays.asList(filterRegistry.getAllDescriptors(descriptors[i].getId()))); return results.toArray();
if(contentService != null) { INavigatorFilterService filterService = contentService.getFilterService(); return filterService.getVisibleFilterDescriptors(); } return NO_ELEMENTS ;
public Object[] getElements(Object inputElement) { ExtensionFilterViewerRegistry filterRegistry = ExtensionFilterRegistryManager.getInstance().getViewerRegistry(contentService.getViewerId()); List results = new ArrayList(); INavigatorContentDescriptor[] descriptors = CONTENT_DESCRIPTOR_REGISTRY.getAllContentDescriptors(); for (int i = 0; i < descriptors.length; i++) if (Utilities.isActive(contentService .getViewerDescriptor(), descriptors[i]) && Utilities.isVisible(contentService .getViewerDescriptor(), descriptors[i])) results.addAll(Arrays.asList(filterRegistry.getAllDescriptors(descriptors[i].getId()))); return results.toArray(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/187a6e5e9526ea47a03a969d7ddb741178d2527d/CommonFilterContentProvider.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/internal/filters/CommonFilterContentProvider.java
autoBuildButton = new Button(composite, SWT.CHECK); autoBuildButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.autobuild")); autoBuildButton.setFont(composite.getFont()); autoBuildButton.setSelection(ResourcesPlugin.getWorkspace().isAutoBuilding()); }
autoBuildButton = new Button(composite, SWT.CHECK); autoBuildButton.setText(IDEWorkbenchMessages .getString("WorkbenchPreference.autobuild")); autoBuildButton.setFont(composite.getFont()); autoBuildButton.setSelection(ResourcesPlugin.getWorkspace() .isAutoBuilding()); }
private void createAutoBuildPref(Composite composite) { autoBuildButton = new Button(composite, SWT.CHECK); autoBuildButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.autobuild")); //$NON-NLS-1$ autoBuildButton.setFont(composite.getFont()); autoBuildButton.setSelection(ResourcesPlugin.getWorkspace().isAutoBuilding()); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
WorkbenchHelp.setHelp(parent, IHelpContextIds.WORKBENCH_PREFERENCE_PAGE);
WorkbenchHelp .setHelp(parent, IHelpContextIds.WORKBENCH_PREFERENCE_PAGE);
protected Control createContents(Composite parent) { WorkbenchHelp.setHelp(parent, IHelpContextIds.WORKBENCH_PREFERENCE_PAGE); Composite composite = createComposite(parent); createAutoBuildPref(composite); createSaveAllBeforeBuildPref(composite); createLaunchPromptPref(composite); createRefreshWorkspaceOnStartupPref(composite); createExitPromptPref(composite); createShowTasksOnAutoBuildPref(composite); createStickyCyclePref(composite); createShowUserDialogPref(composite); createSpace(composite); createSaveIntervalGroup(composite); createSpace(composite); createOpenModeGroup(composite); return composite; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
Composite composite = createComposite(parent);
Composite composite = createComposite(parent);
protected Control createContents(Composite parent) { WorkbenchHelp.setHelp(parent, IHelpContextIds.WORKBENCH_PREFERENCE_PAGE); Composite composite = createComposite(parent); createAutoBuildPref(composite); createSaveAllBeforeBuildPref(composite); createLaunchPromptPref(composite); createRefreshWorkspaceOnStartupPref(composite); createExitPromptPref(composite); createShowTasksOnAutoBuildPref(composite); createStickyCyclePref(composite); createShowUserDialogPref(composite); createSpace(composite); createSaveIntervalGroup(composite); createSpace(composite); createOpenModeGroup(composite); return composite; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
createAutoBuildPref(composite); createSaveAllBeforeBuildPref(composite); createLaunchPromptPref(composite); createRefreshWorkspaceOnStartupPref(composite); createExitPromptPref(composite); createShowTasksOnAutoBuildPref(composite); createStickyCyclePref(composite); createShowUserDialogPref(composite);
createAutoBuildPref(composite); createSaveAllBeforeBuildPref(composite); createLaunchPromptPref(composite); createRefreshWorkspaceOnStartupPref(composite); createExitPromptPref(composite); createShowTasksOnAutoBuildPref(composite); createStickyCyclePref(composite); createShowUserDialogPref(composite); createAutoRefreshControls(composite);
protected Control createContents(Composite parent) { WorkbenchHelp.setHelp(parent, IHelpContextIds.WORKBENCH_PREFERENCE_PAGE); Composite composite = createComposite(parent); createAutoBuildPref(composite); createSaveAllBeforeBuildPref(composite); createLaunchPromptPref(composite); createRefreshWorkspaceOnStartupPref(composite); createExitPromptPref(composite); createShowTasksOnAutoBuildPref(composite); createStickyCyclePref(composite); createShowUserDialogPref(composite); createSpace(composite); createSaveIntervalGroup(composite); createSpace(composite); createOpenModeGroup(composite); return composite; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
createSpace(composite); createSaveIntervalGroup(composite); createSpace(composite); createOpenModeGroup(composite); return composite; }
createSpace(composite); createSaveIntervalGroup(composite); createSpace(composite); createOpenModeGroup(composite); return composite; }
protected Control createContents(Composite parent) { WorkbenchHelp.setHelp(parent, IHelpContextIds.WORKBENCH_PREFERENCE_PAGE); Composite composite = createComposite(parent); createAutoBuildPref(composite); createSaveAllBeforeBuildPref(composite); createLaunchPromptPref(composite); createRefreshWorkspaceOnStartupPref(composite); createExitPromptPref(composite); createShowTasksOnAutoBuildPref(composite); createStickyCyclePref(composite); createShowUserDialogPref(composite); createSpace(composite); createSaveIntervalGroup(composite); createSpace(composite); createOpenModeGroup(composite); return composite; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
exitPromptButton = new Button(composite, SWT.CHECK); exitPromptButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.exitPromptButton")); exitPromptButton.setFont(composite.getFont()); exitPromptButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); }
exitPromptButton = new Button(composite, SWT.CHECK); exitPromptButton.setText(IDEWorkbenchMessages .getString("WorkbenchPreference.exitPromptButton")); exitPromptButton.setFont(composite.getFont()); exitPromptButton.setSelection(getIDEPreferenceStore().getBoolean( IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); }
protected void createExitPromptPref(Composite composite) { exitPromptButton = new Button(composite, SWT.CHECK); exitPromptButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.exitPromptButton")); //$NON-NLS-1$ exitPromptButton.setFont(composite.getFont()); exitPromptButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
launchPromptButton = new Button(composite, SWT.CHECK); launchPromptButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.launchPromptButton")); launchPromptButton.setFont(composite.getFont());
launchPromptButton = new Button(composite, SWT.CHECK); launchPromptButton.setText(IDEWorkbenchMessages .getString("WorkbenchPreference.launchPromptButton")); launchPromptButton.setFont(composite.getFont());
protected void createLaunchPromptPref(Composite composite) { launchPromptButton = new Button(composite, SWT.CHECK); launchPromptButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.launchPromptButton")); //$NON-NLS-1$ launchPromptButton.setFont(composite.getFont()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. launchPromptButton.setSelection(ChooseWorkspaceData.getShowDialogValue()); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
launchPromptButton.setSelection(ChooseWorkspaceData.getShowDialogValue()); }
launchPromptButton.setSelection(ChooseWorkspaceData .getShowDialogValue()); }
protected void createLaunchPromptPref(Composite composite) { launchPromptButton = new Button(composite, SWT.CHECK); launchPromptButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.launchPromptButton")); //$NON-NLS-1$ launchPromptButton.setFont(composite.getFont()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. launchPromptButton.setSelection(ChooseWorkspaceData.getShowDialogValue()); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
refreshButton = new Button(composite, SWT.CHECK); refreshButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.refreshButton")); refreshButton.setFont(composite.getFont()); refreshButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); }
refreshButton = new Button(composite, SWT.CHECK); refreshButton.setText(IDEWorkbenchMessages .getString("WorkbenchPreference.refreshButton")); refreshButton.setFont(composite.getFont()); refreshButton.setSelection(getIDEPreferenceStore().getBoolean( IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); }
protected void createRefreshWorkspaceOnStartupPref(Composite composite) { refreshButton = new Button(composite, SWT.CHECK); refreshButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.refreshButton")); //$NON-NLS-1$ refreshButton.setFont(composite.getFont()); refreshButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
autoSaveAllButton = new Button(composite, SWT.CHECK); autoSaveAllButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.savePriorToBuilding")); autoSaveAllButton.setFont(composite.getFont()); autoSaveAllButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); }
autoSaveAllButton = new Button(composite, SWT.CHECK); autoSaveAllButton.setText(IDEWorkbenchMessages .getString("WorkbenchPreference.savePriorToBuilding")); autoSaveAllButton.setFont(composite.getFont()); autoSaveAllButton.setSelection(getIDEPreferenceStore().getBoolean( IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); }
protected void createSaveAllBeforeBuildPref(Composite composite) { autoSaveAllButton = new Button(composite, SWT.CHECK); autoSaveAllButton.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.savePriorToBuilding")); //$NON-NLS-1$ autoSaveAllButton.setFont(composite.getFont()); autoSaveAllButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont()); saveInterval = new IntegerFieldEditor(IDEInternalPreferences.SAVE_INTERVAL, IDEWorkbenchMessages.getString("WorkbenchPreference.saveInterval"), groupComposite);
Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont());
private void createSaveIntervalGroup(Composite composite) { Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont()); saveInterval = new IntegerFieldEditor(IDEInternalPreferences.SAVE_INTERVAL, IDEWorkbenchMessages.getString("WorkbenchPreference.saveInterval"), groupComposite); //$NON-NLS-1$ // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. saveInterval.setPreferenceStore(getIDEPreferenceStore()); saveInterval.setPreferencePage(this); saveInterval.setTextLimit(Integer.toString(IDEInternalPreferences.MAX_SAVE_INTERVAL).length()); saveInterval.setErrorMessage(IDEWorkbenchMessages.format("WorkbenchPreference.saveIntervalError", new Object[] { new Integer(IDEInternalPreferences.MAX_SAVE_INTERVAL)})); //$NON-NLS-1$ saveInterval.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); saveInterval.setValidRange(1, IDEInternalPreferences.MAX_SAVE_INTERVAL); IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); long interval = description.getSnapshotInterval() / 60000; saveInterval.setStringValue(Long.toString(interval)); saveInterval.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
saveInterval.setPreferenceStore(getIDEPreferenceStore()); saveInterval.setPreferencePage(this); saveInterval.setTextLimit(Integer.toString(IDEInternalPreferences.MAX_SAVE_INTERVAL).length()); saveInterval.setErrorMessage(IDEWorkbenchMessages.format("WorkbenchPreference.saveIntervalError", new Object[] { new Integer(IDEInternalPreferences.MAX_SAVE_INTERVAL)})); saveInterval.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); saveInterval.setValidRange(1, IDEInternalPreferences.MAX_SAVE_INTERVAL);
saveInterval = new IntegerFieldEditor( IDEInternalPreferences.SAVE_INTERVAL, IDEWorkbenchMessages .getString("WorkbenchPreference.saveInterval"), groupComposite);
private void createSaveIntervalGroup(Composite composite) { Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont()); saveInterval = new IntegerFieldEditor(IDEInternalPreferences.SAVE_INTERVAL, IDEWorkbenchMessages.getString("WorkbenchPreference.saveInterval"), groupComposite); //$NON-NLS-1$ // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. saveInterval.setPreferenceStore(getIDEPreferenceStore()); saveInterval.setPreferencePage(this); saveInterval.setTextLimit(Integer.toString(IDEInternalPreferences.MAX_SAVE_INTERVAL).length()); saveInterval.setErrorMessage(IDEWorkbenchMessages.format("WorkbenchPreference.saveIntervalError", new Object[] { new Integer(IDEInternalPreferences.MAX_SAVE_INTERVAL)})); //$NON-NLS-1$ saveInterval.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); saveInterval.setValidRange(1, IDEInternalPreferences.MAX_SAVE_INTERVAL); IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); long interval = description.getSnapshotInterval() / 60000; saveInterval.setStringValue(Long.toString(interval)); saveInterval.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); long interval = description.getSnapshotInterval() / 60000; saveInterval.setStringValue(Long.toString(interval));
saveInterval.setPreferenceStore(getIDEPreferenceStore()); saveInterval.setPreferencePage(this); saveInterval.setTextLimit(Integer.toString( IDEInternalPreferences.MAX_SAVE_INTERVAL).length()); saveInterval.setErrorMessage(IDEWorkbenchMessages.format( "WorkbenchPreference.saveIntervalError", new Object[] { new Integer( IDEInternalPreferences.MAX_SAVE_INTERVAL)})); saveInterval .setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); saveInterval.setValidRange(1, IDEInternalPreferences.MAX_SAVE_INTERVAL);
private void createSaveIntervalGroup(Composite composite) { Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont()); saveInterval = new IntegerFieldEditor(IDEInternalPreferences.SAVE_INTERVAL, IDEWorkbenchMessages.getString("WorkbenchPreference.saveInterval"), groupComposite); //$NON-NLS-1$ // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. saveInterval.setPreferenceStore(getIDEPreferenceStore()); saveInterval.setPreferencePage(this); saveInterval.setTextLimit(Integer.toString(IDEInternalPreferences.MAX_SAVE_INTERVAL).length()); saveInterval.setErrorMessage(IDEWorkbenchMessages.format("WorkbenchPreference.saveIntervalError", new Object[] { new Integer(IDEInternalPreferences.MAX_SAVE_INTERVAL)})); //$NON-NLS-1$ saveInterval.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); saveInterval.setValidRange(1, IDEInternalPreferences.MAX_SAVE_INTERVAL); IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); long interval = description.getSnapshotInterval() / 60000; saveInterval.setStringValue(Long.toString(interval)); saveInterval.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
saveInterval.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); } }); }
IWorkspaceDescription description = ResourcesPlugin.getWorkspace() .getDescription(); long interval = description.getSnapshotInterval() / 60000; saveInterval.setStringValue(Long.toString(interval)); saveInterval.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); } }); }
private void createSaveIntervalGroup(Composite composite) { Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); groupComposite.setFont(composite.getFont()); saveInterval = new IntegerFieldEditor(IDEInternalPreferences.SAVE_INTERVAL, IDEWorkbenchMessages.getString("WorkbenchPreference.saveInterval"), groupComposite); //$NON-NLS-1$ // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. saveInterval.setPreferenceStore(getIDEPreferenceStore()); saveInterval.setPreferencePage(this); saveInterval.setTextLimit(Integer.toString(IDEInternalPreferences.MAX_SAVE_INTERVAL).length()); saveInterval.setErrorMessage(IDEWorkbenchMessages.format("WorkbenchPreference.saveIntervalError", new Object[] { new Integer(IDEInternalPreferences.MAX_SAVE_INTERVAL)})); //$NON-NLS-1$ saveInterval.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); saveInterval.setValidRange(1, IDEInternalPreferences.MAX_SAVE_INTERVAL); IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); long interval = description.getSnapshotInterval() / 60000; saveInterval.setStringValue(Long.toString(interval)); saveInterval.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); }
if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); }
public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(saveInterval.isValid()); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
showTasks = new Button(composite, SWT.CHECK); showTasks.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.showTasks")); showTasks.setFont(composite.getFont()); showTasks.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); }
showTasks = new Button(composite, SWT.CHECK); showTasks.setText(IDEWorkbenchMessages .getString("WorkbenchPreference.showTasks")); showTasks.setFont(composite.getFont()); showTasks.setSelection(getIDEPreferenceStore().getBoolean( IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); }
protected void createShowTasksOnAutoBuildPref(Composite composite) { showTasks = new Button(composite, SWT.CHECK); showTasks.setText(IDEWorkbenchMessages.getString("WorkbenchPreference.showTasks")); //$NON-NLS-1$ showTasks.setFont(composite.getFont()); showTasks.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
return IDEWorkbenchPlugin.getDefault().getPreferenceStore(); }
return IDEWorkbenchPlugin.getDefault().getPreferenceStore(); }
protected IPreferenceStore getIDEPreferenceStore() { return IDEWorkbenchPlugin.getDefault().getPreferenceStore(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
boolean autoBuild = ResourcesPlugin.getPlugin().getPluginPreferences().getDefaultBoolean(ResourcesPlugin.PREF_AUTO_BUILDING); autoBuildButton.setSelection(autoBuild); IPreferenceStore store = getIDEPreferenceStore(); autoSaveAllButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); refreshButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); launchPromptButton.setSelection(true); exitPromptButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); showTasks.setSelection(store.getBoolean(IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); saveInterval.loadDefault();
boolean autoBuild = ResourcesPlugin.getPlugin().getPluginPreferences() .getDefaultBoolean(ResourcesPlugin.PREF_AUTO_BUILDING); autoBuildButton.setSelection(autoBuild);
protected void performDefaults() { // core holds onto this preference. boolean autoBuild = ResourcesPlugin.getPlugin().getPluginPreferences().getDefaultBoolean(ResourcesPlugin.PREF_AUTO_BUILDING); autoBuildButton.setSelection(autoBuild); IPreferenceStore store = getIDEPreferenceStore(); autoSaveAllButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); refreshButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); launchPromptButton.setSelection(true); exitPromptButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); showTasks.setSelection(store.getBoolean(IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); saveInterval.loadDefault(); super.performDefaults(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
super.performDefaults(); }
IPreferenceStore store = getIDEPreferenceStore(); autoSaveAllButton .setSelection(store .getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); refreshButton .setSelection(store .getDefaultBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); launchPromptButton.setSelection(true); exitPromptButton .setSelection(store .getDefaultBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); showTasks.setSelection(store .getBoolean(IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); saveInterval.loadDefault(); boolean autoRefresh = ResourcesPlugin.getPlugin().getPluginPreferences().getDefaultBoolean( ResourcesPlugin.PREF_AUTO_REFRESH); autoRefreshButton.setSelection(autoRefresh); super.performDefaults(); }
protected void performDefaults() { // core holds onto this preference. boolean autoBuild = ResourcesPlugin.getPlugin().getPluginPreferences().getDefaultBoolean(ResourcesPlugin.PREF_AUTO_BUILDING); autoBuildButton.setSelection(autoBuild); IPreferenceStore store = getIDEPreferenceStore(); autoSaveAllButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); refreshButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP)); launchPromptButton.setSelection(true); exitPromptButton.setSelection(store.getDefaultBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW)); showTasks.setSelection(store.getBoolean(IDEInternalPreferences.SHOW_TASKS_ON_BUILD)); saveInterval.loadDefault(); super.performDefaults(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); } }
IWorkspaceDescription description = ResourcesPlugin.getWorkspace() .getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace() .isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log( "Error changing auto build workspace setting.", e .getStatus()); } }
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
IPreferenceStore store = getIDEPreferenceStore();
IPreferenceStore store = getIDEPreferenceStore();
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection());
store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection());
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection());
store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection());
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection());
ChooseWorkspaceData.setShowDialogValue(launchPromptButton .getSelection());
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection());
store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection());
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection());
store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks .getSelection());
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); } }
long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()) .longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent( IDEInternalPreferences.SAVE_INTERVAL, new Integer( (int) oldSaveInterval), new Integer( (int) newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log( "Error changing save interval preference", e .getStatus()); } } Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences(); boolean autoRefresh = autoRefreshButton.getSelection(); preferences.setValue(ResourcesPlugin.PREF_AUTO_REFRESH, autoRefresh);
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
return super.performOk(); }
return super.performOk(); }
public boolean performOk() { // set the workspace auto-build flag IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace().isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing auto build workspace setting.", e.getStatus()); //$NON-NLS-1$ } } IPreferenceStore store = getIDEPreferenceStore(); // store the save all prior to build setting store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the refresh workspace on startup setting store.setValue(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); // TODO: This should get the value from the configuration preference area, but // dj said we shouldn't use it yet; some final details are being worked // out. Hopefully it will be available soon, at which time the entire // recentWorkspaces.xml file can be removed. But until then, this // preference reads/writes the file each time. ChooseWorkspaceData.setShowDialogValue(launchPromptButton.getSelection()); // store the exit prompt on last window close setting store.setValue(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, exitPromptButton.getSelection()); // store the preference for bringing task view to front on build store.setValue(IDEInternalPreferences.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); // store the workspace save interval // @issue we should drop our preference constant and let clients use core's pref. ours is not up-to-date anyway if someone changes this interval directly thru core api. long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IDEInternalPreferences.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } return super.performOk(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d9f077f11edb05a527f887adc8741e37bc3a1982/IDEWorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
public IRubyObject downto(RubyNumeric to) {
public IRubyObject downto(IRubyObject to) { RubyNumeric test = (RubyNumeric) to;
public IRubyObject downto(RubyNumeric to) { RubyNumeric i = this; while (true) { if (i.callMethod("<", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("-", RubyFixnum.one(getRuntime())); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java
public IRubyObject step(RubyNumeric to, RubyNumeric step) {
public IRubyObject step(IRubyObject to, IRubyObject step) { RubyNumeric test = (RubyNumeric) to;
public IRubyObject step(RubyNumeric to, RubyNumeric step) { RubyNumeric i = this; if (step.getLongValue() == 0) { throw getRuntime().newArgumentError("step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", getRuntime().newFixnum(0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java
if (step.getLongValue() == 0) {
if (((RubyNumeric) step).getLongValue() == 0) {
public IRubyObject step(RubyNumeric to, RubyNumeric step) { RubyNumeric i = this; if (step.getLongValue() == 0) { throw getRuntime().newArgumentError("step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", getRuntime().newFixnum(0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java
if (i.callMethod(cmp, to).isTrue()) {
if (i.callMethod(cmp, test).isTrue()) {
public IRubyObject step(RubyNumeric to, RubyNumeric step) { RubyNumeric i = this; if (step.getLongValue() == 0) { throw getRuntime().newArgumentError("step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", getRuntime().newFixnum(0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java
public IRubyObject upto(RubyNumeric to) {
public IRubyObject upto(IRubyObject to) { RubyNumeric test = (RubyNumeric) to;
public IRubyObject upto(RubyNumeric to) { RubyNumeric i = this; while (true) { if (i.callMethod(">", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", RubyFixnum.one(getRuntime())); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java
if (i.callMethod(">", to).isTrue()) {
if (i.callMethod(">", test).isTrue()) {
public IRubyObject upto(RubyNumeric to) { RubyNumeric i = this; while (true) { if (i.callMethod(">", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", RubyFixnum.one(getRuntime())); } return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java
throw new IndexError(getRuntime(), "index too big");
throw getRuntime().newIndexError("index too big");
public IRubyObject aref(IRubyObject[] args) { int argc = checkArgumentCount(args, 1, 2); if (argc == 2) { int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); if (beg < 0) { beg += getSize(); } return subseq(beg, len); } if (args[0] instanceof RubyFixnum) { return group(RubyNumeric.fix2int(args[0])); } if (args[0] instanceof RubyBignum) { throw new IndexError(getRuntime(), "index too big"); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getSize(), true, false); if (begLen == null) { return getRuntime().getNil(); } return subseq(begLen[0], begLen[1]); } return group(RubyNumeric.num2long(args[0])); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
return RubyArray.newArray(getRuntime(), new IRubyObject[] { begin(index), end(index)});
return getRuntime().newArray(new IRubyObject[] { begin(index), end(index)});
public IRubyObject offset(RubyFixnum index) { if (outOfBounds(index)) { return getRuntime().getNil(); } return RubyArray.newArray(getRuntime(), new IRubyObject[] { begin(index), end(index)}); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
return RubyFixnum.newFixnum(getRuntime(), getSize());
return getRuntime().newFixnum(getSize());
public RubyFixnum size() { return RubyFixnum.newFixnum(getRuntime(), getSize()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
RubyString frozenString = RubyString.newString(getRuntime(), str);
RubyString frozenString = getRuntime().newString(str);
public RubyString string() { RubyString frozenString = RubyString.newString(getRuntime(), str); frozenString.freeze(); return frozenString; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
RubyArray arr = RubyArray.newArray(getRuntime(), begin.length);
RubyArray arr = getRuntime().newArray(begin.length);
public RubyArray to_a() { RubyArray arr = RubyArray.newArray(getRuntime(), begin.length); for (long i = 0; i < begin.length; i++) { arr.append(group(i)); } return arr; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
return RubyString.newString(getRuntime(), str.substring(begin[0], end[0]));
return getRuntime().newString(str.substring(begin[0], end[0]));
public RubyString to_s() { return RubyString.newString(getRuntime(), str.substring(begin[0], end[0])); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
} else if (sourceFromStdin()) { return "-";
private static String displayedFileName() { if (commandline.hasInlineScript()) { return "-e"; } else { return commandline.scriptFileName; } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c3da93e085c746477119bc5aeda273d1c302ac20/Main.java/clean/src/org/jruby/Main.java
} else if (commandline.scriptFileName != null) {
} else if (sourceFromStdin()) { return new InputStreamReader(System.in); } else {
private static Reader getScriptSource() { if (commandline.hasInlineScript()) { return new StringReader(commandline.inlineScript()); } else if (commandline.scriptFileName != null) { File file = new File(commandline.scriptFileName); try { return new BufferedReader(new FileReader(file)); } catch (IOException e) { System.err.println("Error opening script file: " + e.getMessage()); System.exit(1); } } else { return new InputStreamReader(System.in); } Asserts.notReached(); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c3da93e085c746477119bc5aeda273d1c302ac20/Main.java/clean/src/org/jruby/Main.java
} else { return new InputStreamReader(System.in);
private static Reader getScriptSource() { if (commandline.hasInlineScript()) { return new StringReader(commandline.inlineScript()); } else if (commandline.scriptFileName != null) { File file = new File(commandline.scriptFileName); try { return new BufferedReader(new FileReader(file)); } catch (IOException e) { System.err.println("Error opening script file: " + e.getMessage()); System.exit(1); } } else { return new InputStreamReader(System.in); } Asserts.notReached(); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c3da93e085c746477119bc5aeda273d1c302ac20/Main.java/clean/src/org/jruby/Main.java
private static void initializeRuntime(Ruby runtime, String filename) { IRubyObject argumentArray = RubyArray.newArray(runtime, JavaUtil.convertJavaArrayToRuby(runtime, commandline.scriptArguments)); runtime.setVerbose(commandline.verbose); defineGlobal(runtime, "$VERBOSE", commandline.verbose); runtime.defineGlobalConstant("ARGV", argumentArray); defineGlobal(runtime, "$-p", commandline.assumePrinting); defineGlobal(runtime, "$-n", commandline.assumeLoop); defineGlobal(runtime, "$-a", commandline.sDoSplit); defineGlobal(runtime, "$-l", commandline.processLineEnds); runtime.getGlobalVariables().defineReadonly("$*", new ValueAccessor(argumentArray)); runtime.defineVariable(new RubyGlobal.StringGlobalVariable(runtime, "$0", RubyString.newString(runtime, filename))); runtime.getLoadService().init(runtime, commandline.loadPaths()); Iterator iter = commandline.requiredLibraries().iterator(); while (iter.hasNext()) { String scriptName = (String) iter.next(); KernelModule.require(runtime.getTopSelf(), RubyString.newString(runtime, scriptName)); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c3da93e085c746477119bc5aeda273d1c302ac20/Main.java/clean/src/org/jruby/Main.java
RubyClass superClass = (RubyClass) loadClass(javaClass.getSuperclass(), null);
Class javaSuperClass = javaClass.getSuperclass(); RubyClass superClass; if (javaSuperClass != null) { superClass = (RubyClass) loadClass(javaSuperClass, null); } else { superClass = ruby.getClasses().getObjectClass(); }
private RubyClass createRubyClass(Class javaClass, String rubyName) { RubyClass superClass = (RubyClass) loadClass(javaClass.getSuperclass(), null); RubyClass rubyClass = ruby.defineClass(rubyName, superClass); loadedJavaClasses.put(javaClass, rubyClass); defineWrapperMethods(javaClass, rubyClass, true); defineConstants(javaClass, rubyClass); defineFields(javaClass, rubyClass); addDefaultModules(rubyClass); return rubyClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/65afad7d7513ac5beb18e0e8c2782a578e71867b/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java
if (javaClass.isInterface()) { return createRubyInterface(javaClass, rubyName); } else { return createRubyClass(javaClass, rubyName); }
return createRubyClass(javaClass, rubyName);
public RubyModule loadClass(Class javaClass, String rubyName) { if (javaClass == Object.class) { return ruby.getClasses().getJavaObjectClass(); } if (loadedJavaClasses.containsKey(javaClass)) { return (RubyModule) loadedJavaClasses.get(javaClass); } if (rubyName == null) { String javaName = javaClass.getName(); rubyName = javaName.substring(javaName.lastIndexOf('.') + 1); } if (javaClass.isInterface()) { return createRubyInterface(javaClass, rubyName); } else { return createRubyClass(javaClass, rubyName); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/65afad7d7513ac5beb18e0e8c2782a578e71867b/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java
getDiff(sb, renderer.getRenderingContext().getRootBox(), "");
getDiff(sb, renderer.getPanel().getRootBox(), "");
public static String xhtmlToDiff(String xhtml, int width, int height) throws Exception { Document doc = Xx.loadDocument(xhtml); Graphics2DRenderer renderer = new Graphics2DRenderer(); renderer.setDocument(doc, new File(xhtml).toURL().toString()); BufferedImage buff = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); Graphics2D g = (Graphics2D) buff.getGraphics(); Dimension dim = new Dimension(width, height); renderer.layout(g, dim); renderer.render(g); StringBuffer sb = new StringBuffer(); getDiff(sb, renderer.getRenderingContext().getRootBox(), ""); return sb.toString(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0c8a7d8353d6ffe22590674a6ac92af99241b81f/DocumentDiffTest.java/clean/src/java/org/xhtmlrenderer/test/DocumentDiffTest.java
System.out.println("in Naive User Agent get image: " + uri);
public Image getImage(String uri) { System.out.println("in Naive User Agent get image: " + uri); java.io.InputStream is = null; Image img = null; uri = resolveURI(uri); if (imageCache != null) { SoftReference ref = (SoftReference) imageCache.get(uri); if (ref != null) { img = (Image) ref.get(); } if (img != null) { return img; } } try { is = new URL(uri).openStream(); } catch (FileNotFoundException ex) { XRLog.exception("Can't find image file for URI: '" + uri + "'; skipping."); } catch (java.net.MalformedURLException e) { XRLog.exception("Bad URI given for image file: '" + uri + "'"); } catch (java.io.IOException e) { XRLog.exception("Can't load image file; IO problem for URI '" + uri + "'", e); } if (is != null) { try { img = ImageIO.read(is); img = GraphicsUtil.cleanImage(img); if (imageCache == null) { imageCache = new HashMap(); } imageCache.put(uri, new SoftReference(img)); } catch (Exception e) { XRLog.exception("Can't read image file; unexpected problem for URI '" + uri + "'", e); } } return img; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/a903300c6e179a9fd8d09e8201cd032c88004a9e/NaiveUserAgent.java/buggy/src/java/org/xhtmlrenderer/swing/NaiveUserAgent.java
public Box(Box box) { this(); x = box.x; y = box.y; width = box.width; height = box.height; setNode(box.getNode()); setContent(box.getContent()); border = box.border; margin = box.margin; padding = box.padding; color = box.color;
public Box() { this(true);
public Box(Box box) { this(); x = box.x; y = box.y; width = box.width; height = box.height; setNode(box.getNode()); setContent(box.getContent()); border = box.border; margin = box.margin; padding = box.padding; color = box.color; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
return bd_color;
return border_color;
public BorderColor getBorderColor() { return bd_color; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
sb.append("-content:" + this.getContent());
public String getTestString() { StringBuffer sb = new StringBuffer(); // type if (this instanceof LineBox) { sb.append("line:"); } else if (this instanceof InlineBox) { sb.append("inline:"); } else { sb.append("box:"); } // element sb.append("-content:" + this.getContent()); // dimensions and location sb.append("-box(" + x + "," + y + ")-(" + width + "x" + height + ")"); // positioning info if (relative) { sb.append("-relative"); } if (fixed) { sb.append("-fixed"); } sb.append("-pos(" + top + "," + right + "," + bottom + "," + left + ")"); if (floated) { sb.append("-floated"); } // colors and insets sb.append("-colors(for" + getColorTestString(color)); sb.append("-bor" + getColorTestString(border_color)); sb.append("-bak" + getColorTestString(background_color) + ")"); sb.append("-style(" + border_style + ")"); sb.append("-insets(mar" + getBorderTestString(margin)); sb.append("-bor" + getBorderTestString(border)); sb.append("-pad" + getBorderTestString(padding) + ")"); // background images sb.append("-backimg(" + background_image); sb.append("-" + repeat); sb.append("-" + attachment); sb.append("-" + background_position_vertical); sb.append("-" + background_position_horizontal + ")"); sb.append("-value:" + this.getClosestNode().getNodeValue()); return sb.toString(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
sb.append("-bor" + getColorTestString(border_color));
public String getTestString() { StringBuffer sb = new StringBuffer(); // type if (this instanceof LineBox) { sb.append("line:"); } else if (this instanceof InlineBox) { sb.append("inline:"); } else { sb.append("box:"); } // element sb.append("-content:" + this.getContent()); // dimensions and location sb.append("-box(" + x + "," + y + ")-(" + width + "x" + height + ")"); // positioning info if (relative) { sb.append("-relative"); } if (fixed) { sb.append("-fixed"); } sb.append("-pos(" + top + "," + right + "," + bottom + "," + left + ")"); if (floated) { sb.append("-floated"); } // colors and insets sb.append("-colors(for" + getColorTestString(color)); sb.append("-bor" + getColorTestString(border_color)); sb.append("-bak" + getColorTestString(background_color) + ")"); sb.append("-style(" + border_style + ")"); sb.append("-insets(mar" + getBorderTestString(margin)); sb.append("-bor" + getBorderTestString(border)); sb.append("-pad" + getBorderTestString(padding) + ")"); // background images sb.append("-backimg(" + background_image); sb.append("-" + repeat); sb.append("-" + attachment); sb.append("-" + background_position_vertical); sb.append("-" + background_position_horizontal + ")"); sb.append("-value:" + this.getClosestNode().getNodeValue()); return sb.toString(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
sb.append("-value:" + this.getClosestNode().getNodeValue());
public String getTestString() { StringBuffer sb = new StringBuffer(); // type if (this instanceof LineBox) { sb.append("line:"); } else if (this instanceof InlineBox) { sb.append("inline:"); } else { sb.append("box:"); } // element sb.append("-content:" + this.getContent()); // dimensions and location sb.append("-box(" + x + "," + y + ")-(" + width + "x" + height + ")"); // positioning info if (relative) { sb.append("-relative"); } if (fixed) { sb.append("-fixed"); } sb.append("-pos(" + top + "," + right + "," + bottom + "," + left + ")"); if (floated) { sb.append("-floated"); } // colors and insets sb.append("-colors(for" + getColorTestString(color)); sb.append("-bor" + getColorTestString(border_color)); sb.append("-bak" + getColorTestString(background_color) + ")"); sb.append("-style(" + border_style + ")"); sb.append("-insets(mar" + getBorderTestString(margin)); sb.append("-bor" + getBorderTestString(border)); sb.append("-pad" + getBorderTestString(padding) + ")"); // background images sb.append("-backimg(" + background_image); sb.append("-" + repeat); sb.append("-" + attachment); sb.append("-" + background_position_vertical); sb.append("-" + background_position_horizontal + ")"); sb.append("-value:" + this.getClosestNode().getNodeValue()); return sb.toString(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
return false;
return false;
public boolean isAnonymous() { return false;//TODO: could be achieved by checking content }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
if (getContent() == null) {
/*if (getContent() == null) {
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Box: "); if (getContent() == null) { sb.append(" null content, "); } else { sb.append(getContent().getClass().getName() + " (" + getContent().hashCode() + ")"); } sb.append(" (" + x + "," + y + ")->(" + width + " x " + height + ")"); // CLN: (PWW 13/08/04) sb.append(" color: " + color + " background-color: " + background_color + " "); return sb.toString(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
}
}*/
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Box: "); if (getContent() == null) { sb.append(" null content, "); } else { sb.append(getContent().getClass().getName() + " (" + getContent().hashCode() + ")"); } sb.append(" (" + x + "," + y + ")->(" + width + " x " + height + ")"); // CLN: (PWW 13/08/04) sb.append(" color: " + color + " background-color: " + background_color + " "); return sb.toString(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
super(runtime);
super(runtime, null); this.runtime = runtime;
public RubyNil(Ruby runtime) { super(runtime); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
return RubyFixnum.newFixnum(recv.getRuntime(), 4);
return recv.getRuntime().newFixnum(4);
public static RubyFixnum id(IRubyObject recv) { return RubyFixnum.newFixnum(recv.getRuntime(), 4); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
return RubyString.newString(recv.getRuntime(), "nil");
return recv.getRuntime().newString("nil");
public static RubyString inspect(IRubyObject recv) { return RubyString.newString(recv.getRuntime(), "nil"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
return RubyBoolean.newBoolean(recv.getRuntime(), obj.isTrue());
return recv.getRuntime().newBoolean(obj.isTrue());
public static RubyBoolean op_or(IRubyObject recv, IRubyObject obj) { return RubyBoolean.newBoolean(recv.getRuntime(), obj.isTrue()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
return RubyBoolean.newBoolean(recv.getRuntime(), obj.isTrue());
return recv.getRuntime().newBoolean(obj.isTrue());
public static RubyBoolean op_xor(IRubyObject recv, IRubyObject obj) { return RubyBoolean.newBoolean(recv.getRuntime(), obj.isTrue()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
return RubyArray.newArray(recv.getRuntime(), 0);
return recv.getRuntime().newArray(0);
public static RubyArray to_a(IRubyObject recv) { return RubyArray.newArray(recv.getRuntime(), 0); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
return RubyString.newString(recv.getRuntime(), "");
return recv.getRuntime().newString("");
public static RubyString to_s(IRubyObject recv) { return RubyString.newString(recv.getRuntime(), ""); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
if(node == null) { return null; }
public Element getRealElement() { if(isElement()) { return getElement(); } return (Element)node.getParentNode(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0fb2fda73fc4a67fffbbf7f1b003b679c2b84519/Box.java/buggy/src/java/org/xhtmlrenderer/render/Box.java
u.p("this = " + this);
public boolean isElement() { if(node == null) { u.p("this = " + this); return false; } if ( node.getNodeType() == node.ELEMENT_NODE ) { return true; } return false; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0fb2fda73fc4a67fffbbf7f1b003b679c2b84519/Box.java/buggy/src/java/org/xhtmlrenderer/render/Box.java
String style = _attRes.getElementStyling(e); if (style == null || style.equals("")) return null;
private org.xhtmlrenderer.css.sheet.Ruleset getElementStyle(org.w3c.dom.Element e) { if (_attRes == null || _styleFactory == null) return null; org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) _elStyle.get(e); String style = _attRes.getElementStyling(e); if (style == null || style.equals("")) return null; if (rs == null) { rs = _styleFactory.parseStyleDeclaration(org.xhtmlrenderer.css.sheet.StylesheetInfo.AUTHOR, style); _elStyle.put(e, rs); } return rs; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/818dbc98b6944a37a9ca4de5aad33f76c88c17c6/Matcher.java/clean/src/java/org/xhtmlrenderer/css/newmatch/Matcher.java
String style = _attRes.getElementStyling(e); if (style == null || style.equals("")) return null;
private org.xhtmlrenderer.css.sheet.Ruleset getElementStyle(org.w3c.dom.Element e) { if (_attRes == null || _styleFactory == null) return null; org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) _elStyle.get(e); String style = _attRes.getElementStyling(e); if (style == null || style.equals("")) return null; if (rs == null) { rs = _styleFactory.parseStyleDeclaration(org.xhtmlrenderer.css.sheet.StylesheetInfo.AUTHOR, style); _elStyle.put(e, rs); } return rs; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/818dbc98b6944a37a9ca4de5aad33f76c88c17c6/Matcher.java/clean/src/java/org/xhtmlrenderer/css/newmatch/Matcher.java
setModified(true);
public void setApproved(boolean approved) { if (approved != _approved) { _approved = approved; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java
setModified(true);
public void setApprovedByUserId(String approvedByUserId) { if (((approvedByUserId == null) && (_approvedByUserId != null)) || ((approvedByUserId != null) && (_approvedByUserId == null)) || ((approvedByUserId != null) && (_approvedByUserId != null) && !approvedByUserId.equals(_approvedByUserId))) { if (!XSS_ALLOW_APPROVEDBYUSERID) { approvedByUserId = XSSUtil.strip(approvedByUserId); } _approvedByUserId = approvedByUserId; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java
setModified(true);
public void setApprovedByUserName(String approvedByUserName) { if (((approvedByUserName == null) && (_approvedByUserName != null)) || ((approvedByUserName != null) && (_approvedByUserName == null)) || ((approvedByUserName != null) && (_approvedByUserName != null) && !approvedByUserName.equals(_approvedByUserName))) { if (!XSS_ALLOW_APPROVEDBYUSERNAME) { approvedByUserName = XSSUtil.strip(approvedByUserName); } _approvedByUserName = approvedByUserName; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java
setModified(true);
public void setApprovedDate(Date approvedDate) { if (((approvedDate == null) && (_approvedDate != null)) || ((approvedDate != null) && (_approvedDate == null)) || ((approvedDate != null) && (_approvedDate != null) && !approvedDate.equals(_approvedDate))) { _approvedDate = approvedDate; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java
setModified(true);
public void setArticleId(String articleId) { if (((articleId == null) && (_articleId != null)) || ((articleId != null) && (_articleId == null)) || ((articleId != null) && (_articleId != null) && !articleId.equals(_articleId))) { if (!XSS_ALLOW_ARTICLEID) { articleId = XSSUtil.strip(articleId); } _articleId = articleId; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java
setModified(true);
public void setCompanyId(String companyId) { if (((companyId == null) && (_companyId != null)) || ((companyId != null) && (_companyId == null)) || ((companyId != null) && (_companyId != null) && !companyId.equals(_companyId))) { if (!XSS_ALLOW_COMPANYID) { companyId = XSSUtil.strip(companyId); } _companyId = companyId; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java
setModified(true);
public void setContent(String content) { if (((content == null) && (_content != null)) || ((content != null) && (_content == null)) || ((content != null) && (_content != null) && !content.equals(_content))) { if (!XSS_ALLOW_CONTENT) { content = XSSUtil.strip(content); } _content = content; setModified(true); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalArticleModel.java/buggy/portal-ejb/src/com/liferay/portlet/journal/model/JournalArticleModel.java