buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public String toString() { StringBuffer buffer = new StringBuffer(); switch (this.evaluationType) { case T_CODE_SNIPPET: buffer.append("Code snippet"); //$NON-NLS-1$ break; case T_IMPORT: buffer.append("Import"); //$NON-NLS-1$ break; case T_INTERNAL: buffer.append("Internal problem"); //$NON-NLS-...
public String toString() { StringBuffer buffer = new StringBuffer(); switch (this.evaluationType) { case T_CODE_SNIPPET: buffer.append("Code snippet"); //$NON-NLS-1$ break; case T_IMPORT: buffer.append("Import"); //$NON-NLS-1$ break; case T_INTERNAL: buffer.append("Internal problem"); //$NON-NLS-...
public ComposerSpellCheck(ComposerController composerController) { this.composerController = composerController; /* spellCheckConfig = MailConfig.getComposerOptionsConfig().getSpellcheckItem(); ASpellInterface.setAspellExeFilename( spellCheckConfig.ge...
public ComposerSpellCheck(ComposerController composerController) { this.composerController = composerController; /* spellCheckConfig = MailInterface.config.getComposerOptionsConfig().getSpellcheckItem(); ASpellInterface.setAspellExeFilename( spellChec...
public void testComputeCheckPeriod() { DailyRollingFileAppender drfa = new DailyRollingFileAppender(); drfa.setName("testComputeCheckPeriod"); drfa.setOption(DailyRollingFileAppender.DATE_PATTERN_OPTION, "yyyy-MM-dd.'log'"); assertEquals(drfa.computeCheckPeriod(), DailyRollingFileAppender....
public void testComputeCheckPeriod() { DailyRollingFileAppender drfa = new DailyRollingFileAppender(); drfa.setName("testComputeCheckPeriod"); drfa.setOption(DailyRollingFileAppender.DATE_PATTERN_OPTION, "yyyy-MM-dd.'log'"); assertEquals(drfa.computeCheckPeriod(), DailyRollingFileAppender....
public static String id() { return "@version@"; }
public static String id() { return "3.8"; }
public void doService(Request req, Response res) throws Exception { String location = (String) req.getAttribute("javax.servlet.error.message"); Context ctx=req.getContext(); location = makeAbsolute(req, location); ctx.log("Redirect " + location + " " + req ); res.setContentType("text/html"); // I...
public void doService(Request req, Response res) throws Exception { String location = (String) req.getAttribute("javax.servlet.error.message"); Context ctx=req.getContext(); location = makeAbsolute(req, location); if( debug>0) ctx.log("Redirect " + location + " " + req ); res.setContentType("text...
public static IClasspathEntry newSourceEntry(IPath path, IPath[] inclusionPatterns, IPath[] exclusionPatterns, IPath specificOutputLocation, IClasspathAttribute[] extraAttributes) { if (path == null) Assert.isTrue(false, "Source path cannot be null"); //$NON-NLS-1$ if (!path.isAbsolute()) Assert.isTrue(false, "Pa...
public static IClasspathEntry newSourceEntry(IPath path, IPath[] inclusionPatterns, IPath[] exclusionPatterns, IPath specificOutputLocation, IClasspathAttribute[] extraAttributes) { if (path == null) Assert.isTrue(false, "Source path cannot be null"); //$NON-NLS-1$ if (!path.isAbsolute()) Assert.isTrue(false, "Pa...
public static void init () { Locale.setDefault(new Locale(System.getProperty("user.language", "en"), System.getProperty("user.country", "CA"))); org.workingfrog.i18n.util.Translator.setDefaultLocale( new Locale("en", "")); org.workingfrog.i18n.util.Translator.loadBu...
public static void init () { Locale.setDefault(new Locale(System.getProperty("user.language", "en"), System.getProperty("user.country", ""))); org.workingfrog.i18n.util.Translator.setDefaultLocale( new Locale("en", "")); org.workingfrog.i18n.util.Translator.loadBund...
protected void setStatusAdapter(StatusAdapter adapter) { list.removeAll(); populateList(list, adapter.getStatus(), 0); if (workbenchStatusDialog.getErrors().size() == 1) { Long timestamp = (Long) adapter .getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY); if (timestamp != null) { String dat...
protected void setStatusAdapter(StatusAdapter adapter) { list.removeAll(); populateList(list, adapter.getStatus(), 0); if (workbenchStatusDialog.getStatusAdapters().size() == 1) { Long timestamp = (Long) adapter .getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY); if (timestamp != null) { St...
public MemberValuePair newMemberValuePair() { MemberValuePair result = new MemberValuePair(this); return result; } /** * Enables the recording of changes to the given compilation * unit and its descendents. The compilation unit must have * been created by <code>ASTParser</code> and still be in * its ori...
public MemberValuePair newMemberValuePair() { MemberValuePair result = new MemberValuePair(this); return result; } /** * Enables the recording of changes to the given compilation * unit and its descendents. The compilation unit must have * been created by <code>ASTParser</code> and still be in * its ori...
public void generateSyntheticBodyForMethodAccess(SyntheticAccessMethodBinding accessBinding) { initializeMaxLocals(accessBinding); MethodBinding methodBinding = accessBinding.targetMethod; TypeBinding[] parameters = methodBinding.parameters; int length = parameters.length; int resolvedPosition; if (methodBinding...
public void generateSyntheticBodyForMethodAccess(SyntheticAccessMethodBinding accessBinding) { initializeMaxLocals(accessBinding); MethodBinding methodBinding = accessBinding.targetMethod; TypeBinding[] parameters = methodBinding.parameters; int length = parameters.length; int resolvedPosition; if (methodBinding...
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) { // Flatten the values and compute the dimensions, by iterating in depth into nested array initializers int pc = codeStream.position; int expressionLength = (expressions == null) ? 0: expressions.length; codeStream.gen...
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) { // Flatten the values and compute the dimensions, by iterating in depth into nested array initializers int pc = codeStream.position; int expressionLength = (expressions == null) ? 0: expressions.length; codeStream.gen...
public ConstructorDeclaration(CompilationResult compilationResult){ super(compilationResult); } /** * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#analyseCode(org.eclipse.jdt.internal.compiler.lookup.ClassScope, org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext, org.eclipse.jdt...
public ConstructorDeclaration(CompilationResult compilationResult){ super(compilationResult); } /** * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#analyseCode(org.eclipse.jdt.internal.compiler.lookup.ClassScope, org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext, org.eclipse.jdt...
public void activate(IWorkbenchPart part) { // Sanity check. if (!certifyPart(part)) return; // If zoomed, unzoom. if (isZoomed() && partChangeAffectsZoom(part)) zoomOut(); PartPane pane = ((PartSite)part.getSite()).getPane(); if(part instanceof MultiEditor) { part = ((MultiEditor)part).getActiveEdito...
public void activate(IWorkbenchPart part) { // Sanity check. if (!certifyPart(part)) return; // If zoomed, unzoom. if (isZoomed() && partChangeAffectsZoom(part)) zoomOut(); ((PartSite)part.getSite()).getPane(); if(part instanceof MultiEditor) { part = ((MultiEditor)part).getActiveEditor(); } // Acti...
public ColumbaMessage fetchMessage(int index) throws Exception { isLogin(); String rawString = protocol.fetchMessage(new Integer(index).toString()); if (rawString.length() == 0) return null; // pipe through preprocessing filter if (popItem.getBoolean("enable_pop3preprocessingfilter", false)) rawStrin...
public ColumbaMessage fetchMessage(int index) throws Exception { isLogin(); String rawString = protocol.fetchMessage(new Integer(index).toString()); if (rawString.length() == 0) return null; // pipe through preprocessing filter if (popItem.getBoolean("enable_pop3preprocessingfilter", false)) rawStrin...
protected ActionExit() { super ("Exit", NO_ICON); active = false; }
protected ActionExit() { super ("action.exit", NO_ICON); active = false; }
public void valueChanged(ListSelectionEvent evt) { if(selectAllFlag) return; int index = bufferList.getSelectedIndex(); if(index != -1) view.setBuffer(jEdit.getBuffer((String) bufferModel.getElementAt(index))); updateButtons(); } } //}}} }
public void valueChanged(ListSelectionEvent evt) { if(selectAllFlag) return; int index = bufferList.getSelectedIndex(); if(index != -1) view.goToBuffer(jEdit.getBuffer((String) bufferModel.getElementAt(index))); updateButtons(); } } //}}} }
public int nextChar() throws ParseException { if (!hasMoreInput()) return -1; int ch = current.stream[current.cursor]; current.cursor++; if (ch == '\n') { current.line++; current.col = 0; } else { current.col++; } return ch; } /** * Gets Content until the next potential...
public int nextChar() throws ParseException { if (!hasMoreInput()) return -1; int ch = current.stream[current.cursor]; current.cursor++; if (ch == '\n') { current.line++; current.col = 0; } else { current.col++; } return ch; } /** * Gets Content until the next potential...
public int getNodeType() { return FIELD_ACCESS; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone(AST target) { FieldAccess result = new FieldAccess(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setExpression((Expression) getExpressio...
public int getNodeType() { return FIELD_ACCESS; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone0(AST target) { FieldAccess result = new FieldAccess(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setExpression((Expression) getExpressi...
private HashMap[] getRootInfos(boolean usePreviousSession) { HashMap newRoots = new HashMap(); HashMap newOtherRoots = new HashMap(); HashMap newSourceAttachments = new HashMap(); HashMap newProjectDependencies = new HashMap(); IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel(); IJav...
private HashMap[] getRootInfos(boolean usePreviousSession) { HashMap newRoots = new HashMap(); HashMap newOtherRoots = new HashMap(); HashMap newSourceAttachments = new HashMap(); HashMap newProjectDependencies = new HashMap(); IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel(); IJav...
public void initialize(JavaProject project, PotentialMatch[] potentialMatches) throws JavaModelException { // create name environment if (this.nameEnvironment != null) { // cleanup this.nameEnvironment.cleanup(); } if (potentialMatches.length == 1) { // if only one potential match, a file name environmen...
public void initialize(JavaProject project, PotentialMatch[] potentialMatches) throws JavaModelException { // create name environment if (this.nameEnvironment != null) { // cleanup this.nameEnvironment.cleanup(); } if (potentialMatches.length == 1) { // if only one potential match, a file name environmen...
private void setupLogger() { logger.addAppender(appender); logger.setAdditivity(false); logger.setLevel(Level.DEBUG); }
private void setupLogger() { logger.addAppender(appender); logger.setAdditivity(false); logger.setLevel(Boolean.getBoolean("log4j.debug")?Level.DEBUG:Level.INFO); }
public void actionPerformed(ActionEvent evt) { FolderCommandReference[] r = ((AbstractMailFrameController) getFrameController()).getTableSelection(); r[0].setMarkVariant(MarkMessageCommand.MARK_AS_READ); MarkMessageCommand c = new MarkMessageCommand(r); MainInterface.processor.addOp(c); }
public void actionPerformed(ActionEvent evt) { FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection(); r[0].setMarkVariant(MarkMessageCommand.MARK_AS_READ); MarkMessageCommand c = new MarkMessageCommand(r); MainInterface.processor.addOp(c); }
public IToolBarManager getToolBarManager() { IToolBarManager parentMgr = parent.getToolBarManager(); if (parentMgr instanceof ToolBarManager) { return super.getToolBarManager(); } else if (parentMgr instanceof CoolBarManager) { if (coolItemToolBarMgr == null) { // Create a CoolBar item for this action bar. ...
public IToolBarManager getToolBarManager() { IToolBarManager parentMgr = parent.getToolBarManager(); if (parentMgr instanceof ToolBarManager) { return super.getToolBarManager(); } else if (parentMgr instanceof CoolBarManager) { if (coolItemToolBarMgr == null) { // Create a CoolBar item for this action bar. ...
public String format(LoggingEvent event) { if(sbuf.capacity() > MAX_CAPACITY) { sbuf = new StringBuffer(BUF_SIZE); } else { sbuf.setLength(0); } sbuf.append("\r\n\r\n<tr>"); sbuf.append("<td>"); sbuf.append(event.timeStamp - event.getStartTime()); sbuf.append("</...
public String format(LoggingEvent event) { if(sbuf.capacity() > MAX_CAPACITY) { sbuf = new StringBuffer(BUF_SIZE); } else { sbuf.setLength(0); } sbuf.append("\r\n\r\n<tr>"); sbuf.append("<td>"); sbuf.append(event.timeStamp - event.getStartTime()); sbuf.append("</...
public void execute(ContextManager cm) throws TomcatException { try { String tomcatHome= cm.getHome(); String apacheHome=findApache(); //System.out.println("Tomcat home= " + tomcatHome); FileWriter configW=new FileWriter( tomcatHome + APACHE_CONFIG); PrintWriter pw=new PrintWri...
public void execute(ContextManager cm) throws TomcatException { try { String tomcatHome= cm.getHome(); String apacheHome=findApache(); //System.out.println("Tomcat home= " + tomcatHome); FileWriter configW=new FileWriter( tomcatHome + APACHE_CONFIG); PrintWriter pw=new PrintWri...
public void processNewLoggingEvent(String eventType, LoggingEvent event) { EventTypeEntryContainer container = getContainer(eventType); container.addLevel(event.getLevel()); container.addLogger(event.getLoggerName()); container.addThread(event.getThreadName()); container.addNDC(event.getNDC()); ...
public void processNewLoggingEvent(String eventType, LoggingEvent event) { EventTypeEntryContainer container = getContainer(eventType); container.addLevel(event.getLevel()); container.addLogger(event.getLoggerName()); container.addThread(event.getThreadName()); container.addNDC(event.getNDC()); ...
private void printLineComment() { int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition(); int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1; boolean includesLineComments = includesLineComments(); boolean isNlsTag = false; if (CharOperation.indexOf...
private void printLineComment() { int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition(); int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1; boolean includesLineComments = includesLineComments(); boolean isNlsTag = false; if (CharOperation.indexOf...
public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) { if (!flowInfo.isReachable()) return; NestedTypeBinding nestedType = (NestedTypeBinding) binding; MethodScope methodScope = currentScope.methodScope(); if (!methodScope.isStatic && !methodScope.isConstructorCa...
public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) { if (!flowInfo.isReachable()) return; NestedTypeBinding nestedType = (NestedTypeBinding) binding; MethodScope methodScope = currentScope.methodScope(); if (!methodScope.isStatic && !methodScope.isConstructorCa...
private UNKRecord() {} UNKRecord(Name _name, short _type, short _dclass, int _ttl, int length, DataByteInputStream in, Compression c) throws IOException { super(_name, _type, _dclass, _ttl); if (in == null) return; if (length > 0) { data = new byte[length]; in.read(data); } else data = null; }
private UNKRecord() {} UNKRecord(Name _name, short _type, short _dclass, int _ttl, int length, DataByteInputStream in) throws IOException { super(_name, _type, _dclass, _ttl); if (in == null) return; if (length > 0) { data = new byte[length]; in.read(data); } else data = null; }
public int NUM_CHANGES = 100; // number of separate document changes... used to decide when to merge SimpleLookupTable docsToReferences; // document paths -> HashtableOfObject(category names -> set of words) SimpleWordSet allWords; // save space by locally interning the referenced words, since an indexer can generate ...
public int NUM_CHANGES = 100; // number of separate document changes... used to decide when to merge SimpleLookupTable docsToReferences; // document paths -> HashtableOfObject(category names -> set of words) SimpleWordSet allWords; // save space by locally interning the referenced words, since an indexer can generate ...
public void generateStoreSaveValueIfNecessary(BlockScope currentScope, CodeStream codeStream){ // push receiver codeStream.aload_0(); // push the 2 parameters of "setResult(Object, Class)" if (this.expression == null || this.expressionType == VoidBinding) { // expressionType == VoidBinding if code snippet is the ...
public void generateStoreSaveValueIfNecessary(BlockScope currentScope, CodeStream codeStream){ // push receiver codeStream.aload_0(); // push the 2 parameters of "setResult(Object, Class)" if (this.expression == null || this.expressionType == VoidBinding) { // expressionType == VoidBinding if code snippet is the ...
public FontSizeMenu(FrameMediator controller) { super(controller, MailResourceLoader.getString("menu", "composer", "menu_format_font_size")); initMenu(); // Enable when implemented setEnabled(false); }
public FontSizeMenu(FrameMediator controller) { super(controller, MailResourceLoader.getString("menu", "composer", "menu_format_font_size"),"menu_format_font_size"); initMenu(); // Enable when implemented setEnabled(false); }
public void checkComment() { super.checkComment(); if (this.javadoc != null) { // Search for pattern locator matches in javadoc comment @throws/@exception tags TypeReference[] thrownExceptions = this.javadoc.thrownExceptions; int throwsTagsNbre = thrownExceptions == null ? 0 : thrownExceptions.length; for (in...
public void checkComment() { super.checkComment(); if (this.javadocParser.checkJavadoc && this.javadoc != null) { // Search for pattern locator matches in javadoc comment @throws/@exception tags TypeReference[] thrownExceptions = this.javadoc.thrownExceptions; int throwsTagsNbre = thrownExceptions == null ? 0 :...
public DetachedWindow(WorkbenchPage workbenchPage) { super(workbenchPage.getWorkbenchWindow().getShell()); setShellStyle( //SWT.CLOSE | SWT.MIN | SWT.MAX | SWT.RESIZE ); this.page = workbenchPage; folder = new PartTabFolder(page, SWT.NONE); }
public DetachedWindow(WorkbenchPage workbenchPage) { super(workbenchPage.getWorkbenchWindow().getShell()); setShellStyle( //SWT.CLOSE | SWT.MIN | SWT.MAX | SWT.RESIZE ); this.page = workbenchPage; folder = new PartTabFolder(page, false); }
public ConfigExample() { super(); // open configuration file File file = Facade.getPluginConfigFile("org.columba.example.ConfigExample"); try { XmlIO xmlIO = new XmlIO(file.toURL()); xmlFile.load(); parent = xmlFile.getRoot(); } catch (MalformedURLException e) { e.printStackTrace(); } ...
public ConfigExample() { super(); // open configuration file File file = Facade.getPluginConfigFile("org.columba.example.ConfigExample"); try { xmlFile = new XmlIO(file.toURL()); xmlFile.load(); parent = xmlFile.getRoot(); } catch (MalformedURLException e) { e.printStackTrace(); } }
public void resolve(MethodScope initializationScope) { // the two <constant = Constant.NotAConstant> could be regrouped into // a single line but it is clearer to have two lines while the reason of their // existence is not at all the same. See comment for the second one. //----------------------------------...
public void resolve(MethodScope initializationScope) { // the two <constant = Constant.NotAConstant> could be regrouped into // a single line but it is clearer to have two lines while the reason of their // existence is not at all the same. See comment for the second one. //----------------------------------...
public interface IActiveKeyConfigurationDefinition extends Comparable { /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of ...
public interface IActiveKeyConfigurationDefinition extends Comparable { /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of ...
public void saveOptionsToXml(MessageFolder folder) { XmlElement parent = getConfigNode(folder); DefaultItem item = new DefaultItem(parent); TableController tableController = ((TableViewOwner) getMediator()) .getTableController(); MessageNode node = tableController.g...
public void saveOptionsToXml(MessageFolder folder) { XmlElement parent = getConfigNode(folder); DefaultItem item = new DefaultItem(parent); TableController tableController = ((TableViewOwner) getMediator()) .getTableController(); MessageNode node = tableController.g...
private TypeBinding internalResolveType(Scope scope, ReferenceBinding genericType, int rank) { TypeBinding boundType = null; if (this.bound != null) { boundType = scope.kind == Scope.CLASS_SCOPE ? this.bound.resolveType((ClassScope)scope) : this.bound.resolveType((BlockScope)scope, tru...
private TypeBinding internalResolveType(Scope scope, ReferenceBinding genericType, int rank) { TypeBinding boundType = null; if (this.bound != null) { boundType = scope.kind == Scope.CLASS_SCOPE ? this.bound.resolveType((ClassScope)scope) : this.bound.resolveType((BlockScope)scope, tru...
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) { CompilationResult result = new CompilationResult(sourceTypes[0].getFileName(), 1, 1, 0); CompilationUnitDeclaration unit = SourceTypeConverter.buildCompilationUnit( sourceTypes, false, // no need for field and methods
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) { CompilationResult result = new CompilationResult(sourceTypes[0].getFileName(), 1, 1, 0); CompilationUnitDeclaration unit = SourceTypeConverter.buildCompilationUnit( sourceTypes, //sourceTypes[0] is always toplevel here false, // no...
public List readTasks(StorableInput dr) throws IOException { int size = dr.readInt(); List l = CollectionsFactory.current().createList(size); for (int i=0; i<size; i++) { l.add((Figure)dr.readStorable()); } return l; }
public List readTasks(StorableInput dr) throws IOException { int size = dr.readInt(); List l = CollectionsFactory.current().createList(size); for (int i=0; i<size; i++) { l.add(dr.readStorable()); } return l; }
public Expression convert(org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression allocation) { if (allocation.anonymousType != null) { ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); classInstanceCreation.setName(convert(allocation.type)); if (allocation.enclo...
public Expression convert(org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression allocation) { if (allocation.anonymousType != null) { ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); classInstanceCreation.setName(convert(allocation.type)); if (allocation.enclo...
public void locateMatchesInClassFile() throws CoreException { org.eclipse.jdt.internal.core.ClassFile classFile = (org.eclipse.jdt.internal.core.ClassFile)this.openable; IBinaryType info = this.locator.getBinaryInfo(classFile, this.resource); if (info == null) return; // unable to go further // check cla...
public void locateMatchesInClassFile() throws CoreException { org.eclipse.jdt.internal.core.ClassFile classFile = (org.eclipse.jdt.internal.core.ClassFile)this.openable; IBinaryType info = this.locator.getBinaryInfo(classFile, this.resource); if (info == null) return; // unable to go further // check cla...
public static void permutationDump() { System.out.print("Current permutation is - "); for(int i = 0; i < LENGTH; i++) { System.out.print(names[i] + " "); } System.out.println(); } // Loop through all possible 3^n combinations of not instantiating, // instantiating and setting/not se...
public static void permutationDump() { System.out.print("Current permutation is - "); for(int i = 0; i < LENGTH; i++) { System.out.print(names[i] + " "); } System.out.println(); } // Loop through all possible 3^n combinations of not instantiating, // instantiating and setting/not se...
public void perform( Date pTimeOfCall, int pRemainingRepetitions );
public void perform( Date pTimeOfCall, long pRemainingRepetitions );
public static int validateMatchRule(String stringPattern, int matchRule) { // Verify Regexp match rule if ((matchRule & R_REGEXP_MATCH) != 0) { if ((matchRule & R_PATTERN_MATCH) != 0 || (matchRule & R_PREFIX_MATCH) != 0 || (matchRule & R_CAMELCASE_MATCH) != 0) { return -1; } } // Verify Pattern match rule ...
public static int validateMatchRule(String stringPattern, int matchRule) { // Verify Regexp match rule if ((matchRule & R_REGEXP_MATCH) != 0) { if ((matchRule & R_PATTERN_MATCH) != 0 || (matchRule & R_PREFIX_MATCH) != 0 || (matchRule & R_CAMELCASE_MATCH) != 0) { return -1; } } // Verify Pattern match rule ...
public int preInitCheck( Request req, Handler sw ) throws TomcatException { fixJDKContextClassLoader(ctx); return 0; }
public int preInitCheck( Request req, Handler sw ) throws TomcatException { fixJDKContextClassLoader(req.getContext()); return 0; }
protected TypeBinding getTypeBinding(Scope scope) { if (this.resolvedType != null) return this.resolvedType; Binding binding = scope.getPackage(this.tokens); if (binding != null && !binding.isValidBinding()) return (ReferenceBinding) binding; // not found PackageBinding packageBinding = binding =...
protected TypeBinding getTypeBinding(Scope scope) { if (this.resolvedType != null) return this.resolvedType; Binding binding = scope.getPackage(this.tokens); if (binding != null && !binding.isValidBinding()) return (ReferenceBinding) binding; // not found PackageBinding packageBinding = binding =...
public AbstractElement[] getElements() { idToElement.clear(); IWorkbenchPage activePage = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage(); if (activePage != null) { PropertyPageManager pageManager = new PropertyPageManager(); ISelection selection = activePage.getSelection(); ...
public AbstractElement[] getElements() { idToElement.clear(); IWorkbenchPage activePage = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage(); if (activePage != null) { PropertyPageManager pageManager = new PropertyPageManager(); ISelection selection = activePage.getSelection(); ...
public MultipartIterator(HttpServletRequest request, int bufferSize, long maxSize, String tempDir) throws ServletException { this.request = request; this.maxSize = maxSize; ...
public MultipartIterator(HttpServletRequest request, int bufferSize, long maxSize, String tempDir) throws ServletException { this.request = request; this.maxSize = maxSize; ...
public Vector rowObjectsFor(Object t) { if (!(t instanceof UMLUseCaseDiagram)) return new Vector(); UMLUseCaseDiagram d = (UMLUseCaseDiagram) t; Vector nodes = d.getGraphModel().getNodes(); Vector res = new Vector(); int size = nodes.size(); for (int i = 0; i < size; i++) { Object node =...
public Vector rowObjectsFor(Object t) { if (!(t instanceof UMLUseCaseDiagram)) return new Vector(); UMLUseCaseDiagram d = (UMLUseCaseDiagram) t; Vector nodes = d.getNodes(); Vector res = new Vector(); int size = nodes.size(); for (int i = 0; i < size; i++) { Object node = nodes.elementAt...
public ProblemMethodBinding(MethodBinding closestMatch, char[] selector, TypeBinding[] args, int problemReason) { this(selector, args, problemReason); this.closestMatch = closestMatch; if (closestMatch != null) this.declaringClass = closestMatch.declaringClass; }
public ProblemMethodBinding(MethodBinding closestMatch, char[] selector, TypeBinding[] args, int problemReason) { this(selector, args, problemReason); this.closestMatch = closestMatch; if (closestMatch != null && problemReason != ProblemReasons.Ambiguous) this.declaringClass = closestMatch.declaringClass; }
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { this.breakLabel = new BranchLabel(); this.continueLabel = new BranchLabel(); int initialComplaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0 ? Statement.COMPLAINED_FAKE_REACHABLE : Statement.NOT_COMP...
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { this.breakLabel = new BranchLabel(); this.continueLabel = new BranchLabel(); int initialComplaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0 ? Statement.COMPLAINED_FAKE_REACHABLE : Statement.NOT_COMP...
protected void updateAffectedProjects(IPath prerequisiteProjectPath) { try { IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel(); IJavaProject[] projects = model.getJavaProjects(); for (int i = 0, projectCount = projects.length; i < projectCount; i++) { try { JavaProject proje...
protected void updateAffectedProjects(IPath prerequisiteProjectPath) { try { IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel(); IJavaProject[] projects = model.getJavaProjects(); for (int i = 0, projectCount = projects.length; i < projectCount; i++) { try { JavaProject proje...
// public X(int i) { // this(new Object() { Object obj = X.this; }); // } // } MethodScope methodScope = scope.methodScope(); while (methodScope != null) { if (methodScope.enclosingSourceType() == currentCompatibleType) { if (!this.checkAccess(methodScope, qualificationTb)) return ...
// public X(int i) { // this(new Object() { Object obj = X.this; }); // } // } MethodScope methodScope = scope.methodScope(); while (methodScope != null) { if (methodScope.enclosingSourceType() == currentCompatibleType) { if (!this.checkAccess(methodScope, qualificationTb)) return ...
public PropPanelClassifier(String name, ImageIcon icon, int columns) { super(name,icon,columns); Class mclass = MClassifier.class; // // this will cause the components on this page to be notified // anytime a stereotype, namespace, operation, etc // has its name chang...
public PropPanelClassifier(String name, ImageIcon icon, int columns) { super(name,icon,columns); Class mclass = MClassifier.class; // // this will cause the components on this page to be notified // anytime a stereotype, namespace, operation, etc // has its name chang...
public void build() { if (JavaBuilder.DEBUG) System.out.println("FULL build"); //$NON-NLS-1$ try { notifier.subTask(Util.bind("build.cleaningOutput")); //$NON-NLS-1$ JavaModelManager.getJavaModelManager().deltaProcessor.addForRefresh(javaBuilder.javaProject); JavaBuilder.removeProblemsAndTasksFor(javaBuilder...
public void build() { if (JavaBuilder.DEBUG) System.out.println("FULL build"); //$NON-NLS-1$ try { notifier.subTask(Util.bind("build.cleaningOutput")); //$NON-NLS-1$ JavaModelManager.getJavaModelManager().getDeltaProcessor().addForRefresh(javaBuilder.javaProject); JavaBuilder.removeProblemsAndTasksFor(javaBu...
public AbstractElement[] getElements() { if (cachedElements == null) { IPerspectiveDescriptor[] perspectives = PlatformUI.getWorkbench() .getPerspectiveRegistry().getPerspectives(); cachedElements = new AbstractElement[perspectives.length]; for (int i = 0; i < perspectives.length; i++) { Perspectiv...
public AbstractElement[] getElements() { if (cachedElements == null) { IPerspectiveDescriptor[] perspectives = PlatformUI.getWorkbench() .getPerspectiveRegistry().getPerspectives(); cachedElements = new AbstractElement[perspectives.length]; for (int i = 0; i < perspectives.length; i++) { Perspectiv...
public void codeComplete(int offset, ICompletionRequestor requestor) throws JavaModelException { String source = getSource(); if (source != null) { String encoding = JavaCore.getOption(JavaCore.CORE_ENCODING); String elementName = getElementName(); BasicCompilationUnit cu = new BasicCompilationUnit( get...
public void codeComplete(int offset, ICompletionRequestor requestor) throws JavaModelException { String source = getSource(); if (source != null) { String encoding = this.getJavaProject().getOption(JavaCore.CORE_ENCODING, true); String elementName = getElementName(); BasicCompilationUnit cu = new BasicCompi...
private ASTNode.NodeList fragments = new ASTNode.NodeList(FRAGMENTS_PROPERTY); /** * Creates a new AST node for a tag element owned by the given AST. * The new node has no name and an empty list of fragments. * <p> * N.B. This constructor is package-private; all subclasses must be * declared in the sam...
private ASTNode.NodeList fragments = new ASTNode.NodeList(FRAGMENTS_PROPERTY); /** * Creates a new AST node for a tag element owned by the given AST. * The new node has no name and an empty list of fragments. * <p> * N.B. This constructor is package-private; all subclasses must be * declared in the sam...
public ToDoByGoal() { super("By Goal"); addSubTreeModel(new GoListToGoalsToItems()); }
public ToDoByGoal() { super("todo.perspective.goal"); addSubTreeModel(new GoListToGoalsToItems()); }
public boolean performOk() { copyFromUI(); PreferenceRegistry preferenceRegistry = PreferenceRegistry.getInstance(); preferenceRegistry.setActiveKeyConfigurations(preferenceActiveKeyConfigurations); preferenceRegistry.setKeyBindings(preferenceKeyBindings); preferenceRegistry.setKeyConfigurations(preferenceKe...
public boolean performOk() { copyFromUI(); PreferenceRegistry preferenceRegistry = PreferenceRegistry.getInstance(); preferenceRegistry.setActiveKeyConfigurations(preferenceActiveKeyConfigurations); preferenceRegistry.setKeyBindings(preferenceKeyBindings); preferenceRegistry.setKeyConfigurations(preferenceKe...
public Image getImage(Object object) { Assert.isTrue(object instanceof IWorkingSet); IWorkingSet workingSet = (IWorkingSet) object; ImageDescriptor imageDescriptor = workingSet.getImage(); if (imageDescriptor == null) { return null; } Image icon = (Image) icons.get(ima...
public Image getImage(Object object) { Assert.isTrue(object instanceof IWorkingSet); IWorkingSet workingSet = (IWorkingSet) object; ImageDescriptor imageDescriptor = workingSet.getImageDescriptor(); if (imageDescriptor == null) { return null; } Image icon = (Image) ico...
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICodeCompletionRequestor requestor) throws JavaModelException { if (requestor == null) { throw new IllegalArgumentException(Util.bind("codeAssist.nul...
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICodeCompletionRequestor requestor) throws JavaModelException { if (requestor == null) { throw new IllegalArgumentException(Util.bind("codeAssist.nul...
public void readNextRequest(Request req) throws IOException { String dummy,token1,token2; int marker; int signal; try { boolean more=true; while (more) { marker = ajpin.read(); switch (marker) { case 0: //NOP marker useful for testing if stream is OK break; case 1: /...
public void readNextRequest(Request req) throws IOException { String dummy,token1,token2; int marker; int signal; try { boolean more=true; while (more) { marker = ajpin.read(); switch (marker) { case 0: //NOP marker useful for testing if stream is OK break; case 1: /...
public void initialize(JavaProject project) throws JavaModelException { // create lookup environment CompilerOptions options = new CompilerOptions(project.getOptions(true)); ProblemReporter problemReporter = new ProblemReporter( DefaultErrorHandlingPolicies.proceedWithAllProblems(), options, new D...
public void initialize(JavaProject project) throws JavaModelException { // create lookup environment CompilerOptions options = new CompilerOptions(project.getOptions(true)); ProblemReporter problemReporter = new ProblemReporter( DefaultErrorHandlingPolicies.proceedWithAllProblems(), options, new D...
public void testAppender2() { a1 = new FileAppender(); a1.setName("testAppender2.1"); a2 = new FileAppender(); a2.setName("testAppender2.2"); logger = Logger.getLogger("test"); logger.addAppender(a1); logger.addAppender(a2); logger.removeAppender("testAppen...
public void testAppender2() { a1 = new FileAppender(); a1.setName("testAppender2.1"); a2 = new FileAppender(); a2.setName("testAppender2.2"); logger = Logger.getLogger("test"); logger.addAppender(a1); logger.addAppender(a2); logger.removeAppender("testAppen...
protected boolean resumeOnSyntaxError() { if (this.diet || this.hasRecoveredOnExpression) { // no reentering inside expression recovery return super.resumeOnSyntaxError(); } // record previous error, in case more accurate than potential one in expression recovery // e.g. "return foo(a a); 1+3" this.problemCoun...
protected boolean resumeOnSyntaxError() { if (this.diet || this.hasRecoveredOnExpression) { // no reentering inside expression recovery return super.resumeOnSyntaxError(); } // record previous error, in case more accurate than potential one in expression recovery // e.g. "return foo(a a); 1+3" this.problemCoun...
public boolean overrides(IMethodBinding overridenMethod) { try { org.eclipse.jdt.internal.compiler.lookup.MethodBinding overridenCompilerBinding = ((MethodBinding) overridenMethod).binding; if (this.binding == overridenCompilerBinding || overridenCompilerBinding.isStatic() || overridenCompilerBinding...
public boolean overrides(IMethodBinding overridenMethod) { try { org.eclipse.jdt.internal.compiler.lookup.MethodBinding overridenCompilerBinding = ((MethodBinding) overridenMethod).binding; if (this.binding == overridenCompilerBinding || overridenCompilerBinding.isStatic() || overridenCompilerBinding...
public static final int UNRECOGNIZED_JAVADOC_FORMAT = 1009; }
public static final int UNKNOWN_JAVADOC_FORMAT = 1009; }
public ResourceCompilationUnit(IFile file, URI location) { super(null/*no contents*/, location == null ? file.getFullPath().toString() : location.getSchemeSpecificPart(), null/*encoding is used only when retrieving the contents*/); this.file = file; }
public ResourceCompilationUnit(IFile file, URI location) { super(null/*no contents*/, location == null ? file.getFullPath().toString() : location.getPath(), null/*encoding is used only when retrieving the contents*/); this.file = file; }
private void doxfr() throws IOException, ZoneTransferException { sendQuery(); while (state != END) { Message response; Record [] answers; response = stream.next(); if (response.tsigState == Message.TSIG_FAILED) { fail("TSIG failure"); } answers = response.getSectionArray(Section.ANSWER); if (state...
private void doxfr() throws IOException, ZoneTransferException { sendQuery(); while (state != END) { Message response; Record [] answers; response = stream.next(); if (response.tsigState == Message.TSIG_FAILED) { fail("TSIG failure"); } answers = response.getSectionArray(Section.ANSWER); if (state...
public ChActor() { setNextCategory("Naming"); addItem("Does the name '{name}' clearly describe the class?"); addItem("Is '{name}' a noun or noun phrase?"); addItem("Could the name '{name}' be misinterpreted to mean something else?"); setNextCategory("Encoding"); addItem("Should {name} be its own class o...
public ChActor() { setNextCategory("Naming"); addItem("Does the name '{name}' clearly describe the class?"); addItem("Is '{name}' a noun or noun phrase?"); addItem("Could the name '{name}' be misinterpreted to mean something else?"); setNextCategory("Encoding"); addItem("Should {name} be its own class o...
public void save(IProgressMonitor pm, boolean force) throws JavaModelException { if (isReadOnly() || this.getResource().isReadOnly()) { throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this)); } IBuffer buf = getBuffer(); if (buf != null) { // some Openables (like a JavaProjec...
public void save(IProgressMonitor pm, boolean force) throws JavaModelException { if (isReadOnly()) { throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this)); } IBuffer buf = getBuffer(); if (buf != null) { // some Openables (like a JavaProject) don't have a buffer buf.save(p...
public void execute(ContextManager cm) throws TomcatException { // Find Ajp12 connector int portInt=8007; InetAddress address=null; ContextInterceptor ci[]=cm.getContextInterceptors(); for( int i=0; i<ci.length; i++ ) { Object con=ci[i]; if( con instanceof Ajp12ConnectionHandler ) { PoolTcpC...
public void execute(ContextManager cm) throws TomcatException { // Find Ajp12 connector int portInt=8007; InetAddress address=null; BaseInterceptor ci[]=cm.getContextInterceptors(); for( int i=0; i<ci.length; i++ ) { Object con=ci[i]; if( con instanceof Ajp12ConnectionHandler ) { PoolTcpConn...
public void setHeaderItem(int row, HeaderItem item) { rows.replace(row, item); //fireTableDataChanged(); }
public void setHeaderItem(int row, HeaderItem item) { rows.replace(row, item); fireTableDataChanged(); }
public void generateCode(BlockScope currentScope, CodeStream codeStream) { if ((bits & IsReachableMASK) == 0) { return; } int pc = codeStream.position; // generate the synchronization expression expression.generateCode(scope, codeStream, true); if (block.isEmptyBlock()) { if ((synchroVariable.type == LongBin...
public void generateCode(BlockScope currentScope, CodeStream codeStream) { if ((bits & IsReachableMASK) == 0) { return; } int pc = codeStream.position; // generate the synchronization expression expression.generateCode(scope, codeStream, true); if (block.isEmptyBlock()) { if ((synchroVariable.type == LongBin...
public String getVersion() { return Version.id(); } /** * Run all the tests in <code>classes</code>. * @param classes the classes containing tests * @return a {@link Result} describing the details of the test run and the failed tests. */ public Result run(Class<?>... classes) { return run(Request.clas...
public String getVersion() { return Version.id(); } /** * Run all the tests in <code>classes</code>. * @param classes the classes containing tests * @return a {@link Result} describing the details of the test run and the failed tests. */ public Result run(Class<?>... classes) { return run(Request.clas...
private ActionUseCaseDiagram() { super(Translator.localize("CoreMenu", "UseCaseDiagram")); }
private ActionUseCaseDiagram() { super("UseCaseDiagram"); }
* N.B. This constructor is package-private. * </p> * * @param ast the AST that is to own this node */ TypeLiteral(AST ast) { super(ast); } /* (omit javadoc for this method) * Method declared on ASTNode. */ final List internalStructuralPropertiesForType(int apiLevel) { return propertyDescriptors(...
* N.B. This constructor is package-private. * </p> * * @param ast the AST that is to own this node */ TypeLiteral(AST ast) { super(ast); } /* (omit javadoc for this method) * Method declared on ASTNode. */ final List internalStructuralPropertiesForType(int apiLevel) { return propertyDescriptors(...
public void test2() throws Exception { String testName = "test2"; Logger logger = Logger.getLogger(testName); setupAppender(testName); PluginTester plugin1 = new PluginTester1("plugin1", 1); PluginTester plugin2 = new PluginTester1("plugin2", 2); PluginTester retPlugin; LoggerReposit...
public void test2() throws Exception { String testName = "test2"; Logger logger = Logger.getLogger(testName); setupAppender(testName); PluginTester plugin1 = new PluginTester1("plugin1", 1); PluginTester plugin2 = new PluginTester1("plugin2", 2); PluginTester retPlugin; LoggerReposit...
public void stateChanged(ChangeEvent e) { System.out.println("DetailsPane state changed"); Component sel = _tabs.getSelectedComponent(); if (sel instanceof TabToDoTarget) { ((TabToDoTarget)sel).setTarget(null); ((TabToDoTarget)sel).setTarget(_item); } else if (sel instanceof TabToDoTar...
public void stateChanged(ChangeEvent e) { //System.out.println("DetailsPane state changed"); Component sel = _tabs.getSelectedComponent(); if (sel instanceof TabToDoTarget) { ((TabToDoTarget)sel).setTarget(null); ((TabToDoTarget)sel).setTarget(_item); } else if (sel instanceof TabToDoT...
public PackageFragmentRootInfo() { this.fNonJavaResources = null; } /** * Starting at this folder, create non-java resources for this package fragment root * and add them to the non-java resources collection. * * @exception JavaModelException The resource associated with this package fragment does not exist */...
public PackageFragmentRootInfo() { this.fNonJavaResources = null; } /** * Starting at this folder, create non-java resources for this package fragment root * and add them to the non-java resources collection. * * @exception JavaModelException The resource associated with this package fragment does not exist */...
public void actionPerformed(ActionEvent evt) { // Select INBOX FolderCommandReference[] refs = new FolderCommandReference[1]; refs[0] = new FolderCommandReference(MailInterface.treeModel.getFolder(101)); getFrameController().getSelectionManager().setSelection("mail.tree", refs); // Fetch Messages ...
public void actionPerformed(ActionEvent evt) { // Select INBOX FolderCommandReference[] refs = new FolderCommandReference[1]; refs[0] = new FolderCommandReference(MailInterface.treeModel.getFolder(101)); getFrameMediator().getSelectionManager().setSelection("mail.tree", refs); // Fetch Messages Li...
private IWorkingSet set; ToggleWorkingSetAction(IWorkingSet set) { super(set.getLabel(), IAction.AS_CHECK_BOX); setImageDescriptor(set.getImage()); this.set = set; setChecked(isWorkingSetEnabled(set)); }
private IWorkingSet set; ToggleWorkingSetAction(IWorkingSet set) { super(set.getLabel(), IAction.AS_CHECK_BOX); setImageDescriptor(set.getImageDescriptor()); this.set = set; setChecked(isWorkingSetEnabled(set)); }
public AddressbookConfig() { File configDirectory = createConfigDir(MODULE_NAME); addressbookFile = new File(configDirectory, "addressbook.xml"); registerPlugin( addressbookFile.getName(), new DefaultXmlConfig(addressbookFile)); addressbookOptionsFile = new File(configDirectory, "addressbookoptions...
public AddressbookConfig() { File configDirectory = createConfigDir(MODULE_NAME); addressbookFile = new File(configDirectory, "addressbook.xml"); registerPlugin( addressbookFile.getName(), new DefaultXmlConfig(addressbookFile)); addressbookOptionsFile = new File(configDirectory, "options.xml"); r...
public WorkingCopy getWorkingCopy() { String name = getElementName(); name = name.substring(0, name.length() - 6); // remove ".class" name = name + ".java"; //$NON-NLS-1$ return new WorkingCopy((IPackageFragment) getParent(), name); }
public WorkingCopy getWorkingCopy() { String name = getElementName(); name = name.substring(0, name.length() - 6); // remove ".class" name = name + ".java"; //$NON-NLS-1$ return new WorkingCopy((IPackageFragment) getParent(), name, null); }
public SendableMessage compose( WorkerStatusController workerStatusController) throws Exception { this.accountUid = model.getAccountItem().getUid(); workerStatusController.setDisplayText("Composing Message..."); MimeTreeRenderer renderer = MimeTreeRenderer.getInstance(); ...
public SendableMessage compose( WorkerStatusController workerStatusController) throws Exception { this.accountUid = model.getAccountItem().getUid(); workerStatusController.setDisplayText("Composing Message..."); MimeTreeRenderer renderer = MimeTreeRenderer.getInstance(); ...
protected void reportDeclaration(FieldBinding fieldBinding, MatchLocator locator, SimpleSet knownFields) throws CoreException { // ignore length field if (fieldBinding == ArrayBinding.ArrayLength) return; ReferenceBinding declaringClass = fieldBinding.declaringClass; IType type = locator.lookupType(declaringClass...
protected void reportDeclaration(FieldBinding fieldBinding, MatchLocator locator, SimpleSet knownFields) throws CoreException { // ignore length field if (fieldBinding == ArrayBinding.ArrayLength) return; ReferenceBinding declaringClass = fieldBinding.declaringClass; IType type = locator.lookupType(declaringClass...
private void generateAnnotation(Annotation annotation, int attributeOffset) { if (contentsOffset + 4 >= this.contents.length) { resizeContents(4); } TypeBinding annotationTypeBinding = annotation.resolvedType; if (annotationTypeBinding == null) { this.contentsOffset = attributeOffset; return; } fi...
private void generateAnnotation(Annotation annotation, int attributeOffset) { if (contentsOffset + 4 >= this.contents.length) { resizeContents(4); } TypeBinding annotationTypeBinding = annotation.resolvedType; if (annotationTypeBinding == null) { this.contentsOffset = attributeOffset; return; } fi...
protected CompilationUnit(IPackageFragment parent, String name) { super(COMPILATION_UNIT, parent, name); if (!Util.isJavaFileName(name)) { throw new IllegalArgumentException(Util.bind("element.invalidUnitName"/*nonNLS*/)); } }
protected CompilationUnit(IPackageFragment parent, String name) { super(COMPILATION_UNIT, parent, name); if (!Util.isJavaFileName(name)) { throw new IllegalArgumentException(Util.bind("convention.unit.notJavaName"/*nonNLS*/)); } }
private IBuffer mapSource(SourceMapper mapper, IBinaryType info) { char[] contents = mapper.findSource(getType(), info); if (contents != null) { // create buffer IBuffer buffer = getBufferManager().createBuffer(this); if (buffer == null) return null; BufferManager bufManager = getBufferManager(); bufManager...
private IBuffer mapSource(SourceMapper mapper, IBinaryType info) { char[] contents = mapper.findSource(getType(), info); if (contents != null) { // create buffer IBuffer buffer = BufferManager.createBuffer(this); if (buffer == null) return null; BufferManager bufManager = getBufferManager(); bufManager.addB...
public Message() { this(Header.randomID()); }
public Message() { this(new Header()); }
public int getNodeType() { return ARRAY_TYPE; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone(AST target) { ArrayType result = new ArrayType(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setComponentType((Type) getComponentType().cl...
public int getNodeType() { return ARRAY_TYPE; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone0(AST target) { ArrayType result = new ArrayType(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setComponentType((Type) getComponentType().c...
private ReferenceBinding findSupertype(TypeReference typeReference) { try { typeReference.aboutToResolve(this); // allows us to trap completion & selection nodes compilationUnitScope().recordQualifiedReference(typeReference.getTypeName()); this.superTypeReference = typeReference; ReferenceBinding superTy...
private ReferenceBinding findSupertype(TypeReference typeReference) { try { typeReference.aboutToResolve(this); // allows us to trap completion & selection nodes compilationUnitScope().recordQualifiedReference(typeReference.getTypeName()); this.superTypeReference = typeReference; ReferenceBinding superTy...
public int compare(Viewer testViewer, Object e1, Object e2) { return ((Comparable) e1).compareTo(e2); } }); ProgressTreeContentProvider provider = new ProgressTreeContentProvider( viewer, Policy.DEBUG_SHOW_SYSTEM_JOBS); ...
public int compare(Viewer testViewer, Object e1, Object e2) { return ((Comparable) e1).compareTo(e2); } }); ProgressTreeContentProvider provider = new ProgressTreeContentProvider( viewer, true); viewer.setConten...
protected void initFactory(ServletContext servletContext, String proposedFilename ) throws DefinitionsFactoryException, FileNotFoundException { // Init list of filenames StringTokenizer tokenizer = new StringTokenizer( proposedFilename, "," ); this.filenames = new ArrayList(tokenizer.countTok...
protected void initFactory(ServletContext servletContext, String proposedFilename ) throws DefinitionsFactoryException, FileNotFoundException { // Init list of filenames StringTokenizer tokenizer = new StringTokenizer( proposedFilename, "," ); this.filenames = new ArrayList(tokenizer.countTok...
public ASTConverter(boolean resolveBindings) { this.resolveBindings = resolveBindings; scanner = new Scanner(true, false); }
public ASTConverter(boolean resolveBindings) { this.resolveBindings = resolveBindings; scanner = new Scanner(true /*comment*/, false /*whitespace*/, false /*nls*/, false /*assert*/, null /*todo*/); }
public int getNodeType() { return BLOCK; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone(AST target) { Block result = new Block(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.setLeadingComment(getLeadingComment()); result.statement...
public int getNodeType() { return BLOCK; } /* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone(AST target) { Block result = new Block(target); result.setSourceRange(this.getStartPosition(), this.getLength()); result.copyLeadingComment(this); result.statements().addAll( ...
public void testReferenceString() { try { String expected = bma.getBasicRefString(); assertEquals(expected, "string"); } catch (Exception e) { e.printStackTrace(); fail("Can't get ref string" + e); } }
public void testReferenceString() { try { String expected = bma.getBasicRefString(); assertEquals(expected, "string2"); } catch (Exception e) { e.printStackTrace(); fail("Can't get ref string" + e); } }