buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public SelectionScanner(boolean assertMode) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, assertMode /*assert*/, false /*strict comment*/, null /*taskTags*/, null/*taskPriorities*/);
}
| public SelectionScanner(boolean assertMode) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, assertMode /*assert*/, null /*taskTags*/, null/*taskPriorities*/);
}
|
public interface IContextDefinition 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 the Common Publ... | public interface IContextDefinition 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 the Common Publ... |
public OpenPerspectiveAction(final IWorkbenchWindow window,
final IPerspectiveDescriptor descriptor,
final PerspectiveMenu callback) {
super(Util.ZERO_LENGTH_STRING); //$NON-NLS-1$
this.descriptor = descriptor;
this.callback = callback;
final String label = ... | public OpenPerspectiveAction(final IWorkbenchWindow window,
final IPerspectiveDescriptor descriptor,
final PerspectiveMenu callback) {
super(Util.ZERO_LENGTH_STRING);
this.descriptor = descriptor;
this.callback = callback;
final String label = descriptor.get... |
protected void runChild(FrameworkMethod method, RunNotifier notifier) {
EachTestNotifier eachNotifier= makeNotifier(method, notifier);
if (method.getAnnotation(Ignore.class) != null) {
eachNotifier.fireTestIgnored();
return;
}
eachNotifier.fireTestStarted();
try {
methodBlock(method).evaluate();
... | protected void runChild(FrameworkMethod method, RunNotifier notifier) {
EachTestNotifier eachNotifier= makeNotifier(method, notifier);
if (method.getAnnotation(Ignore.class) != null) {
eachNotifier.fireTestIgnored();
return;
}
eachNotifier.fireTestStarted();
try {
methodBlock(method).evaluate();
... |
public ViewMessageCommand(FrameMediator frame,
DefaultCommandReference[] references) {
super(frame, references);
//priority = Command.REALTIME_PRIORITY;
commandType = Command.NORMAL_OPERATION;
}
| public ViewMessageCommand(FrameMediator frame,
DefaultCommandReference[] references) {
super(frame, references);
priority = Command.REALTIME_PRIORITY;
commandType = Command.NORMAL_OPERATION;
}
|
private void addDropSupport() {
if (dropTarget == null) {
WorkbenchWindowConfigurer winConfigurer = ((WorkbenchWindow) page
.getWorkbenchWindow()).getWindowConfigurer();
dropTarget = new DropTarget(getControl(), DND.DROP_DEFAULT
| DND.DROP_COP... | private void addDropSupport() {
if (dropTarget == null) {
WorkbenchWindowConfigurer winConfigurer = ((WorkbenchWindow) page
.getWorkbenchWindow()).getWindowConfigurer();
dropTarget = new DropTarget(getControl(), DND.DROP_DEFAULT
| DND.DROP_COP... |
private static final void readActiveScheme(
final IConfigurationElement[] configurationElements,
final int configurationElementCount, final IMemento preferences,
final BindingManager bindingManager) {
// A non-default preference.
final IPreferenceStore store = PlatformUI.getPreferenceStore();
final Stri... | private static final void readActiveScheme(
final IConfigurationElement[] configurationElements,
final int configurationElementCount, final IMemento preferences,
final BindingManager bindingManager) {
// A non-default preference.
final IPreferenceStore store = PlatformUI.getPreferenceStore();
final Stri... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
IIndex index = manager.getIndex(this.indexPath, true, /*reuse index file*/ false /*create if none*/);
if (index == null) return... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
IIndex index = manager.getIndex(this.indexPath, true, /*reuse index file*/ false /*create if none*/);
if (i... |
public void updateGUI() throws Exception {
removeAll();
image = new ImageIcon(Toolkit.getDefaultToolkit().createImage(data));
//image = new ImageIcon(data);
Container parent = mediator.getViewport();
int cwidth = (int) parent.getWidth();
// if image is bigger than message viewer size
if (cwidth < ima... | public void updateGUI() throws Exception {
removeAll();
image = new ImageIcon(Toolkit.getDefaultToolkit().createImage(data));
//image = new ImageIcon(data);
Container parent = mediator.getViewport();
int cwidth = (int) parent.getWidth();
// if image is bigger than message viewer size
if (cwidth < ima... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
Constant cst = this.assertExpression.optimizedBooleanConstant();
boolean isOptimizedTrueAssertion = cst != Co... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
Constant cst = this.assertExpression.optimizedBooleanConstant();
boolean isOptimizedTrueAssertion = cst != Co... |
public int getNodeType() {
return METHOD_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
MethodDeclaration result = new MethodDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setJavadoc(
(Javad... | public int getNodeType() {
return METHOD_DECLARATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
MethodDeclaration result = new MethodDeclaration(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setJavadoc(
(Java... |
private Name packageName = null;
/**
* Creates a new AST node for a package declaration owned by the
* given AST. The package declaration initially has an unspecified,
* but legal, Java identifier; and an empty list of annotations.
* <p>
* N.B. This constructor is package-private; all subclasses must be
... | private Name packageName = null;
/**
* Creates a new AST node for a package declaration owned by the
* given AST. The package declaration initially has an unspecified,
* but legal, Java identifier; and an empty list of annotations.
* <p>
* N.B. This constructor is package-private; all subclasses must be
... |
private void completeLocalTypes(Binding binding){
switch(binding.bindingType()) {
case Binding.PARAMETERIZED_TYPE :
case Binding.RAW_TYPE :
ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) binding;
this.completeLocalTypes(parameterizedTypeBinding.type);
TypeBinding[] a... | private void completeLocalTypes(Binding binding){
switch(binding.kind()) {
case Binding.PARAMETERIZED_TYPE :
case Binding.RAW_TYPE :
ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) binding;
this.completeLocalTypes(parameterizedTypeBinding.type);
TypeBinding[] args = p... |
public SortElementBuilder(char[] source, int[] positionsToMap, Comparator comparator) {
this.source = source;
this.comparator = comparator;
this.positionsToMap = positionsToMap;
this.scanner = new Scanner(false, false, false, ClassFileConstants.JDK1_3/*sourceLevel*/, null, null);
this.ast = new AST();
| public SortElementBuilder(char[] source, int[] positionsToMap, Comparator comparator) {
this.source = source;
this.comparator = comparator;
this.positionsToMap = positionsToMap;
this.scanner = new Scanner(false, false, false, ClassFileConstants.JDK1_3/*sourceLevel*/, null, null, true/*taskCaseSensitive*/);
t... |
public IJavaProject getJavaProject(String name) {
return new JavaProject(this.getWorkspace().getRoot().getProject(name), this);
}
| public IJavaProject getJavaProject(String name) {
return new JavaProject(ResourcesPlugin.getWorkspace().getRoot().getProject(name), this);
}
|
public String toString() {
return "EditorDescriptor(" + editorName + ")"; //$NON-NLS-2$//$NON-NLS-1$
}
| public String toString() {
return "EditorDescriptor(id=" + getId() + ", label=" + getLabel() + ")"; //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-1$
}
|
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// need assertion flag: $assertionsDisabled on outer most source clas
// (in case of static member of interface, will use the outermost static member - bug 22334)
SourceTypeBindin... | public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// need assertion flag: $assertionsDisabled on outer most source clas
// (in case of static member of interface, will use the outermost static member - bug 22334)
SourceTypeBindin... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = (FolderCommandReference[]) ((AbstractMailFrameController) frameMediator).getTreeSelection();
new FolderOptionsDialog((Folder) r[0].getFolder(), true);
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = (FolderCommandReference[]) ((AbstractMailFrameController) frameMediator).getTreeSelection();
new FolderOptionsDialog((Folder) r[0].getFolder(), true, (AbstractMailFrameController) frameMediator);
}
|
public final int getLineNumber(int position) {
if (this.lineEnds == null)
return 1;
int length = this.linePtr+1;
if (length == 0)
return 1;
int g = 0, d = length - 1;
int m = 0;
while (g <= d) {
m = (g + d) /2;
if (position < this.lineEnds[m]) {
d = m-1;
} else if (position > this.lineEnds[m]) {
... | public final int getLineNumber(int position) {
if (this.lineEnds == null)
return 1;
int length = this.linePtr+1;
if (length == 0)
return 1;
int g = 0, d = length - 1;
int m = 0;
while (g <= d) {
m = g + (d - g) /2;
if (position < this.lineEnds[m]) {
d = m-1;
} else if (position > this.lineEnds[m]) {... |
public char[] readableName() {
return CharOperation.concatWith(compoundName, '.');
}
| public char[] readableName() {
return CharOperation.concatWith(this.compoundName, '.');
}
|
public ActionSaveProject() {
super("Save Project");
}
| public ActionSaveProject() {
super("action.save-project");
}
|
public void save(WorkerStatusController worker) throws Exception {
ColumbaLogger.log.info("saveing header-cache=" + headerFile);
FileOutputStream istream = new FileOutputStream(headerFile.getPath());
ObjectOutputStream p = new ObjectOutputStream(istream);
//int count = getMessageFileCount();
int count =... | public void save(WorkerStatusController worker) throws Exception {
ColumbaLogger.log.info("saving header-cache=" + headerFile);
FileOutputStream istream = new FileOutputStream(headerFile.getPath());
ObjectOutputStream p = new ObjectOutputStream(istream);
//int count = getMessageFileCount();
int count = ... |
public static void propertiesChanged()
{
int newSize = jEdit.getIntegerProperty("history",25);
if(ring == null)
ring = new UndoManager.Remove[newSize];
else if(newSize != ring.length)
{
UndoManager.Remove[] newRing = new UndoManager.Remove[
newSize];
ListModel model = new RingListModel();
int ... | public static void propertiesChanged()
{
int newSize = Math.max(1,jEdit.getIntegerProperty("history",25));
if(ring == null)
ring = new UndoManager.Remove[newSize];
else if(newSize != ring.length)
{
UndoManager.Remove[] newRing = new UndoManager.Remove[
newSize];
ListModel model = new RingListMode... |
protected void readNextRequest() throws IOException {
String dummy,token1,token2;
int marker;
int signal;
// Hashtable env_vars=new Hashtable();
try {
boolean more=true;
while (more) {
marker = ajpin.read();
switch (marker) {
case 0: //NOP marker useful for testing if stream i... | protected void readNextRequest() throws IOException {
String dummy,token1,token2;
int marker;
int signal;
// Hashtable env_vars=new Hashtable();
try {
boolean more=true;
while (more) {
marker = ajpin.read();
switch (marker) {
case 0: //NOP marker useful for testing if stream i... |
public void parse(boolean pauseAfterFullyQualifiedName) {
if (!this.parsingPaused) {
// fully qualified name
parseFullyQualifiedName();
if (pauseAfterFullyQualifiedName) {
this.parsingPaused = true;
return;
}
}
if (!hasTypeName()) {
consumeKey();
return;
}
consumeTopLevelType();
p... | public void parse(boolean pauseAfterFullyQualifiedName) {
if (!this.parsingPaused) {
// fully qualified name
parseFullyQualifiedName();
if (pauseAfterFullyQualifiedName) {
this.parsingPaused = true;
return;
}
}
if (!hasTypeName()) {
consumeKey();
return;
}
consumeTopLevelType();
p... |
public
TKEYRecord(Name name, short dclass, int ttl, Name alg,
Date timeInception, Date timeExpire, short mode, short error,
byte [] key, byte other[]) throws IOException
{
this(name, dclass, ttl);
this.alg = alg;
this.timeInception = timeInception;
this.timeExpire = timeExpire;
this.mode = mode;
this.erro... | public
TKEYRecord(Name name, short dclass, int ttl, Name alg,
Date timeInception, Date timeExpire, short mode, short error,
byte [] key, byte other[])
{
this(name, dclass, ttl);
this.alg = alg;
this.timeInception = timeInception;
this.timeExpire = timeExpire;
this.mode = mode;
this.error = error;
this.ke... |
public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = manager.getIndex(this.containerPath, true, /*reuse index file*/ false /*create if none*/);
if... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = this.manager.getIndex(this.containerPath, true, /*reuse index file*/ false /*create if none*/);... |
public String toString() {
return Localizer.localize ("Tree", "Element->Dependent Element");
}
| public String toString() {
return Localizer.localize ("Tree", "misc.element.dependent-element");
}
|
public void setAccessRestriction(ReferenceBinding type, AccessRestriction accessRestriction) {
if (accessRestriction == null) return;
type.modifiers |= CompilerModifiers.AccRestrictedAccess;
this.accessRestrictions.put(type, accessRestriction);
}
void updateCaches(UnresolvedReferenceBinding unresolvedType, Reference... | public void setAccessRestriction(ReferenceBinding type, AccessRestriction accessRestriction) {
if (accessRestriction == null) return;
type.modifiers |= CompilerModifiers.AccRestrictedAccess;
this.accessRestrictions.put(type, accessRestriction);
}
void updateCaches(UnresolvedReferenceBinding unresolvedType, Reference... |
private void prepareCompiler( JavaCompiler javac,
Options options,
JspCompilationContext ctxt )
throws JasperException
{
String compilerPath = options.getJspCompilerPath();
if (compilerPath != null)
javac.setCompilerPath(compilerPath);
javac.setClassDebugInfo(options.getClas... | private void prepareCompiler( JavaCompiler javac,
Options options,
JspCompilationContext ctxt )
throws JasperException
{
String compilerPath = options.getJspCompilerPath();
if (compilerPath != null)
javac.setCompilerPath(compilerPath);
javac.setClassDebugInfo(options.getClas... |
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) {
CompilationResult result =
new CompilationResult(sourceTypes[0].getFileName(), 1, 1, this.options.maxProblemsPerUnit);
// need to hold onto this
CompilationUnitDeclaration unit =
SourceTypeConverter.buildCompilationUnit(
sou... | public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) {
CompilationResult result =
new CompilationResult(sourceTypes[0].getFileName(), 1, 1, this.options.maxProblemsPerUnit);
// need to hold onto this
CompilationUnitDeclaration unit =
SourceTypeConverter.buildCompilationUnit(
sou... |
private final WorkbenchKeyboard workbenchKeyboard;
/**
* Constructs a new instance of <code>KeyAssistDialog</code>. When the
* dialog is first constructed, it contains no widgets. The dialog is first
* created with no parent. If a parent is required, call
* <code>setParentShell()</code>. Also, between uses, ... | private final WorkbenchKeyboard workbenchKeyboard;
/**
* Constructs a new instance of <code>KeyAssistDialog</code>. When the
* dialog is first constructed, it contains no widgets. The dialog is first
* created with no parent. If a parent is required, call
* <code>setParentShell()</code>. Also, between uses, ... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
LocalVariable... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
LocalVariable... |
private ASTNode.NodeList parameters =
new ASTNode.NodeList(PARAMETERS_PROPERTY);
/**
* Creates a new AST node for a method reference owned by the given
* AST. By default, the method reference is for a method with an
* unspecified, but legal, name; no qualifier; and an empty parameter
* list.
* <p>
... | private ASTNode.NodeList parameters =
new ASTNode.NodeList(PARAMETERS_PROPERTY);
/**
* Creates a new AST node for a method reference owned by the given
* AST. By default, the method reference is for a method with an
* unspecified, but legal, name; no qualifier; and an empty parameter
* list.
* <p>
... |
public void body(String text) throws Exception
{
log().debug("(" + getState() + ") attachment data body: " + text);
if(getState().equals(DBImport.STATE_DB_INSERTION))
{
Attachment attachment = (Attachment)digester.pop();
attachment.setDataAsString(text);
... | public void body(String text) throws Exception
{
log().debug("(" + getState() + ") attachment data body: " + text);
if(getState().equals(XMLImport.STATE_DB_INSERTION))
{
Attachment attachment = (Attachment)digester.pop();
attachment.setDataAsString(text);
... |
public void beginTask(String name, int totalWork) {
taskName = name;
total = totalWork;
synchronized (lock) {
isActive = true;
}
ProgressManager.getInstance().addGroup(this);
}
| public void beginTask(String name, int totalWork) {
taskName = name;
total = totalWork;
synchronized (lock) {
isActive = true;
}
ProgressManager.getInstance().refreshGroup(this);
}
|
public boolean visit(IResourceProxy proxy) throws CoreException {
IResource resource = null;
switch(proxy.getType()) {
case IResource.FILE :
if (Util.isJavaFileName(proxy.getName()) || Util.isClassFileName(proxy.getName())) return false;
resource = proxy.requestResource();
if (javaBui... | public boolean visit(IResourceProxy proxy) throws CoreException {
IResource resource = null;
switch(proxy.getType()) {
case IResource.FILE :
if (Util.isJavaFileName(proxy.getName()) || Util.isClassFileName(proxy.getName())) return false;
resource = proxy.requestResource();
if (javaBui... |
case TerminalTokens.TokenNamepublic:
case TerminalTokens.TokenNameshort:
case TerminalTokens.TokenNamestatic:
case TerminalTokens.TokenNamestrictfp:
case TerminalTokens.TokenNamesuper:
case TerminalTokens.TokenNameswitch:
case TerminalTokens.TokenNamesynchronized:
case TerminalTokens.TokenNameth... | case TerminalTokens.TokenNamepublic:
case TerminalTokens.TokenNameshort:
case TerminalTokens.TokenNamestatic:
case TerminalTokens.TokenNamestrictfp:
case TerminalTokens.TokenNamesuper:
case TerminalTokens.TokenNameswitch:
case TerminalTokens.TokenNamesynchronized:
case TerminalTokens.TokenNameth... |
public static IJavaModelStatus validateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation) {
IProject project = javaProject.getProject();
IPath projectPath= project.getFullPath();
/* validate output location */
if (projectOutputLocation == null) {
return new ... | public static IJavaModelStatus validateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation) {
IProject project = javaProject.getProject();
IPath projectPath= project.getFullPath();
/* validate output location */
if (projectOutputLocation == null) {
return new ... |
public void replace(int index, HeaderItem item) {
if ((index < list.size()) && (index >= 0)) {
list.remove(index);
list.set(index, item);
}
}
| public void replace(int index, HeaderItem item) {
if ((index < list.size()) && (index >= 0)) {
list.remove(index);
list.add(index, item);
}
}
|
public boolean isEquivalentTo(TypeBinding otherType) {
if (this == otherType) return true;
if (otherType == null) return false;
switch(otherType.kind()) {
case Binding.WILDCARD_TYPE :
return ((WildcardBinding) otherType).boundCheck(this);
case Binding.PARAMETERIZED_TYPE :
if ((otherType.tagBits & TagBit... | public boolean isEquivalentTo(TypeBinding otherType) {
if (this == otherType) return true;
if (otherType == null) return false;
switch(otherType.kind()) {
case Binding.WILDCARD_TYPE :
return ((WildcardBinding) otherType).boundCheck(this);
case Binding.PARAMETERIZED_TYPE :
if ((otherType.tagBits & TagBit... |
public
void addRenderer(RendererSupport repository, String renderedClassName,
String renderingClassName) {
LogLog.debug("Rendering class: ["+renderingClassName+"], Rendered class: ["+
renderedClassName+"].");
ObjectRenderer renderer = (ObjectRenderer)
OptionConverter.instantiateByClas... | public
void addRenderer(RendererSupport repository, String renderedClassName,
String renderingClassName) {
LogLog.debug("Rendering class: ["+renderingClassName+"], Rendered class: ["+
renderedClassName+"].");
ObjectRenderer renderer = (ObjectRenderer)
OptionConverter.instantiateByClas... |
public int getNodeType() {
return JAVADOC;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
Javadoc result = new Javadoc(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
if (this.ast.apiLevel == AST.LEVEL_2_0) {
result.setComm... | public int getNodeType() {
return JAVADOC;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
Javadoc result = new Javadoc(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
if (this.ast.apiLevel == AST.LEVEL_2_0) {
result.setCom... |
protected void report(long start, long end, IJavaElement element, int accuracy) throws CoreException {
report((int) (start >> 32), (int) (end & 0xFFFFF), element, accuracy); // extract the start and end from the encoded long positions
}
| protected void report(long start, long end, IJavaElement element, int accuracy) throws CoreException {
report((int) (start >>> 32), (int) end, element, accuracy); // extract the start and end from the encoded long positions
}
|
public CustomizePerspectiveDialog(Shell parentShell, Perspective persp) {
super(parentShell);
perspective = persp;
// @issue should pass in the parent window, not use getActiveWorkbenchWindow()
window = (WorkbenchWindow)PlatformUI.getWorkbench().getActiveWorkbenchWindow();
// build a structure for the menuitems ... | public CustomizePerspectiveDialog(Shell parentShell, Perspective persp) {
super(parentShell);
perspective = persp;
// @issue should pass in the parent window, not use getActiveWorkbenchWindow()
window = (WorkbenchWindow)PlatformUI.getWorkbench().getActiveWorkbenchWindow();
// build a structure for the menuitems ... |
protected void initMenus() {
KeyStroke ctrlN = KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_MASK);
KeyStroke ctrlO = KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK);
KeyStroke ctrlS = KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK);
KeyStroke ctrlP = KeyStroke.getKeyStroke(K... | protected void initMenus() {
KeyStroke ctrlN = KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_MASK);
KeyStroke ctrlO = KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK);
KeyStroke ctrlS = KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK);
KeyStroke ctrlP = KeyStroke.getKeyStroke(K... |
public void addChild(IJavaElement child) {
int length = this.children.length;
if (length == 0) {
this.children = new IJavaElement[] {child};
} else {
for (int i = 0; i < length; i++) {
if (children[i].equals(child))
return; // already included
}
System.arraycopy(this.children, 0, this.chil... | public void addChild(IJavaElement child) {
int length = this.children.length;
if (length == 0) {
this.children = new IJavaElement[] {child};
} else {
for (int i = 0; i < length; i++) {
if (this.children[i].equals(child))
return; // already included
}
System.arraycopy(this.children, 0, this... |
protected String moduleSet1[] = {
"org.apache.tomcat.context.DefaultCMSetter",
"org.apache.tomcat.facade.WebXmlReader",
"org.apache.tomcat.context.PolicyInterceptor",
"org.apache.tomcat.context.LoaderInterceptor12",
"org.apache.tomcat.context.ErrorHandler",
"org.apache.tomcat.context.WorkDirInterceptor",
"or... | protected String moduleSet1[] = {
"org.apache.tomcat.context.DefaultCMSetter",
"org.apache.tomcat.facade.WebXmlReader",
"org.apache.tomcat.context.PolicyInterceptor",
"org.apache.tomcat.context.LoaderInterceptor12",
"org.apache.tomcat.context.ErrorHandler",
"org.apache.tomcat.modules.config.WorkDirSetup",
"o... |
public void actionPerformed(ActionEvent evt) {
((ComposerView) frameMediator.getView()).showAccountInfoPanel();
}
| public void actionPerformed(ActionEvent evt) {
((ComposerView) frameMediator.getBaseView()).showAccountInfoPanel();
}
|
public void widgetSelected(SelectionEvent e) {
history
.shiftCurrentEntry((NavigationHistoryEntry) e.widget
.getData());
}
});
}... | public void widgetSelected(SelectionEvent e) {
history
.shiftCurrentEntry((NavigationHistoryEntry) e.widget
.getData(), forward);
}
});
... |
public PropPanelParameter() {
super("Parameter", _parameterIcon,2);
Class mclass = MParameter.class;
Class[] namesToWatch = { MStereotype.class,MOperation.class,
MParameter.class,MClassifier.class };
setNameEventListening(namesToWatch);
addCaption(Argo.localiz... | public PropPanelParameter() {
super("Parameter", _parameterIcon,2);
Class mclass = MParameter.class;
Class[] namesToWatch = { MStereotype.class,MOperation.class,
MParameter.class,MClassifier.class };
setNameEventListening(namesToWatch);
addCaption(Argo.localiz... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// if reachable, request the addition of a synthetic field for caching the class descriptor
SourceTypeBinding sourceType =
currentScope.outerMostMethodScope().enclosingSourceType();
if ((!(sourceType.isI... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// if reachable, request the addition of a synthetic field for caching the class descriptor
SourceTypeBinding sourceType =
currentScope.outerMostMethodScope().enclosingSourceType();
if ((!(sourceType.isI... |
protected static final String MAIL_RESOURCE_PATH =
"org.columba.modules.mail.i18n";
| protected static final String MAIL_RESOURCE_PATH =
"org.columba.mail.i18n";
|
public boolean isValid( Principal principal, Object credential )
{
if (credential == null)
return false;
Connection con = null;
try
{
InitialContext initial = new InitialContext();
DataSource ds = (DataSource) initial.lookup( "SecurityDS" );
con = ds.getConnection();
Pre... | public boolean isValid( Principal principal, Object credential )
{
if (credential == null)
return false;
Connection con = null;
try
{
InitialContext initial = new InitialContext();
DataSource ds = (DataSource) initial.lookup( "java:/SecurityDS" );
con = ds.getConnection();
... |
public FolderTreeNode(FolderItem node) {
super();
setNode(node);
myLock = new Lock();
}
| public FolderTreeNode(FolderItem node) {
super();
if ( node != null ) setNode(node);
myLock = new Lock();
}
|
public static int MaxStructurallyChangedTypes = 100; // keep track of ? structurally changed types, otherwise consider all to be changed
static final byte VERSION = 0x0010; // reordered patterns in AccessRestrictions
| public static int MaxStructurallyChangedTypes = 100; // keep track of ? structurally changed types, otherwise consider all to be changed
static final byte VERSION = 0x0011; // added discouraged access rules
|
public Object[] getNonJavaResources() throws JavaModelException {
if (this.isDefaultPackage()) {
// We don't want to show non java resources of the default package (see PR #1G58NB8)
return JavaElementInfo.NO_NON_JAVA_RESOURCES;
} else {
return ((PackageFragmentInfo) getElementInfo()).getNonJavaResources(getReso... | public Object[] getNonJavaResources() throws JavaModelException {
if (this.isDefaultPackage()) {
// We don't want to show non java resources of the default package (see PR #1G58NB8)
return JavaElementInfo.NO_NON_JAVA_RESOURCES;
} else {
return ((PackageFragmentInfo) getElementInfo()).getNonJavaResources(getReso... |
public PropPanelAbstraction() {
super("Abstraction",_realizationIcon, 2);
Class mclass = MDependency.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo.localize("UMLMenu", "label.stereotype"),2,0,0);
addField... | public PropPanelAbstraction() {
super("Abstraction",_realizationIcon, 2);
Class mclass = MDependency.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo.localize("UMLMenu", "label.stereotype"),2,0,0);
addField... |
private Openable createElement(IResource resource, int elementType, RootInfo rootInfo) {
if (resource == null) return null;
IPath path = resource.getFullPath();
IJavaElement element = null;
switch (elementType) {
case IJavaElement.JAVA_PROJECT:
// note that non-java resources rooted at the pr... | private Openable createElement(IResource resource, int elementType, RootInfo rootInfo) {
if (resource == null) return null;
IPath path = resource.getFullPath();
IJavaElement element = null;
switch (elementType) {
case IJavaElement.JAVA_PROJECT:
// note that non-java resources rooted at the pr... |
public final void setTarget(Object target) {
if (target instanceof MBase) {
if (_target != null)
UmlModelEventPump.getPump().removeModelEventListener(this, (MBase)_target, getEventName());
_target = target;
UmlModelEventPump.getPump().removeModelEventListe... | public final void setTarget(Object target) {
if (target instanceof MBase) {
if (_target != null)
UmlModelEventPump.getPump().removeModelEventListener(this, (MBase)_target, getEventName());
_target = target;
// UmlModelEventPump.getPump().removeModelEventLi... |
public Image getImage(Object element) {
return JobProgressManager.getInstance().getDisplayImage(
(JobTreeElement) element);
}
| public Image getImage(Object element) {
return ProgressManager.getInstance().getDisplayImage(
(JobTreeElement) element);
}
|
public int authorize( Request req, Response response, String roles[] )
{
if( roles==null || roles.length==0 ) {
// request doesn't need authentication
return OK;
}
// will call authenticate() hooks to get the user
String user=req.getRemoteUser();
if( use... | public int authorize( Request req, Response response, String roles[] )
{
if( roles==null || roles.length==0 ) {
// request doesn't need authentication
return OK;
}
// will call authenticate() hooks to get the user
String user=req.getRemoteUser();
if( use... |
public boolean isHandled() {
if (handler != null) return false;
Map attributeValuesByName = handler.getAttributeValuesByName();
if (attributeValuesByName.containsKey("handled")
&& !Boolean.TRUE.equals(attributeValuesByName.get("handled")))
return false;
... | public boolean isHandled() {
if (handler == null) return false;
Map attributeValuesByName = handler.getAttributeValuesByName();
if (attributeValuesByName.containsKey("handled")
&& !Boolean.TRUE.equals(attributeValuesByName.get("handled")))
return false;
... |
public void execute(Worker worker) throws Exception {
MailFrameController mailFrameController =
(MailFrameController) frameController;
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Object[] uids = MessageNode.toUidArray( (MessageNode[]) r[0].getUids());
Folder srcFolder = (F... | public void execute(Worker worker) throws Exception {
MailFrameController mailFrameController =
(MailFrameController) frameController;
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Object[] uids = r[0].getUids();
Folder srcFolder = (Folder) r[0].getFolder();
for (int j = ... |
protected Openable[] createElements(IResource resource) {
if (resource == null) return null;
String extension = resource.getFileExtension();
extension = extension == null ? null : extension.toLowerCase();
if ("jar".equals(extension) || "zip".equals(extension)) { //$NON-NLS-2$ //$NON-NLS-1$
IJavaProject[] projects... | protected Openable[] createElements(IResource resource) {
if (resource == null) return null;
String extension = resource.getFileExtension();
extension = extension == null ? null : extension.toLowerCase();
if ("jar".equals(extension) || "zip".equals(extension)) { //$NON-NLS-2$ //$NON-NLS-1$
IJavaProject[] projects... |
private void initComponents() {
JPanel main = new JPanel();
FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow, 7dlu, right:pref, 3dlu, pref:grow", //"right:max(40dlu;pref),3dlu,
"");
DefaultFormBuilder builder = new DefaultFormBuilder(main, layout);
b... | private void initComponents() {
JPanel main = new JPanel();
FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow, 7dlu, right:pref, 3dlu, pref:grow", //"right:max(40dlu;pref),3dlu,
"");
DefaultFormBuilder builder = new DefaultFormBuilder(layout, main);
b... |
public SplashScreen()
{
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
setBackground(Color.white);
Font font = new Font("Dialog",Font.PLAIN,10);
setFont(font);
fm = getFontMetrics(font);
image = getToolkit().getImage(
getClass().getResource("/org/gjt/sp/jedit/icons/splash.png"));
MediaT... | public SplashScreen()
{
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
setBackground(Color.white);
Font font = new Font("Dialog",Font.PLAIN,10);
setFont(font);
fm = getFontMetrics(font);
image = getToolkit().getImage(
getClass().getResource("/org/gjt/sp/jedit/icons/splash.png"));
MediaT... |
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position, divergePC;
// codegen here
if (this.assertionSyntheticFieldBinding != null) {
Label assertionActivationLabel = new Label(codeStream);
codeStream.... | public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position;
// codegen here
if (this.assertionSyntheticFieldBinding != null) {
Label assertionActivationLabel = new Label(codeStream);
codeStream.getstatic(t... |
public void actionPerformed(ActionEvent evt) {
ComposerController composerController = ((ComposerController) getFrameMediator());
composerController.getHeaderController().cleanupHeaderItemList();
SelectAddressDialog dialog = new SelectAddressDialog(composerController.getView(),
... | public void actionPerformed(ActionEvent evt) {
ComposerController composerController = ((ComposerController) getFrameMediator());
composerController.getHeaderController().getView().cleanupHeaderItemList();
SelectAddressDialog dialog = new SelectAddressDialog(composerController.getView(),
... |
private TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = Constant.NotAConstant;
if (this.type == null) {
this.resolvedType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
... | private TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = Constant.NotAConstant;
if (this.type == null) {
this.resolvedType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
... |
public URL getResource(String rpath) throws MalformedURLException {
URL url = null;
if ("".equals(rpath))
return getDocumentBase();
if (rpath == null)
return null;
if ( ! rpath.startsWith("/")) {
rpath="/" + rpath;
}
// Create a Sub-Request, do the request processing stage
... | public URL getResource(String rpath) throws MalformedURLException {
URL url = null;
if ("".equals(rpath))
return getDocumentBase();
if (rpath == null)
return null;
if ( ! rpath.startsWith("/")) {
rpath="/" + rpath;
}
// Create a Sub-Request, do the request processing stage
... |
public int getNodeType() {
return PREFIX_EXPRESSION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
PrefixExpression result = new PrefixExpression(target);
| public int getNodeType() {
return PREFIX_EXPRESSION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
PrefixExpression result = new PrefixExpression(target);
|
protected void setMethodParameterNames(
IMethod method,
char[][] parameterNames) {
if (parameterNames == null) {
parameterNames = new char[0][];
}
fParameterNames.put(method, parameterNames);
}
| protected void setMethodParameterNames(
IMethod method,
char[][] parameterNames) {
if (parameterNames == null) {
parameterNames = CharOperation.NO_CHAR_CHAR;
}
fParameterNames.put(method, parameterNames);
}
|
public boolean performFinish() {
SelectionPage first = (SelectionPage) getPages()[0];
first.saveWidgetValues();
RoleManager.getInstance().enableRoles(
first.getSelectedNode().getWizard().getClass().getName());
return true;
}
| public boolean performFinish() {
SelectionPage first = (SelectionPage) getPages()[0];
first.saveWidgetValues();
RoleManager.getInstance().enableActivities(
first.getSelectedNode().getWizard().getClass().getName());
return true;
}
|
public void execute(WorkerStatusController worker) throws Exception {
model = new ComposerModel();
// get selected folder
folder = (MessageFolder) ((FolderCommandReference) getReferences()[0])
.getFolder();
// get selected messages
Object[] uids = ((FolderCommandReference) getReferences()[0]).getUids()... | public void execute(WorkerStatusController worker) throws Exception {
model = new ComposerModel();
// get selected folder
folder = (MessageFolder) ((FolderCommandReference) getReferences()[0])
.getFolder();
// get selected messages
Object[] uids = ((FolderCommandReference) getReferences()[0]).getUids()... |
public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, requestor, problemFa... | public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, requestor, problemFa... |
private void loadCustomPersp(PerspectiveDescriptor persp)
{
try {
InputStream stream = new FileInputStream(persp.getCustomFile());
InputStreamReader reader = new InputStreamReader(stream, "utf-8"); //$NON-NLS-1$
// Restore the layout state.
IMemento memento = XMLMemento.createReadRoot(reader);
MultiStatus st... | private void loadCustomPersp(PerspectiveDescriptor persp)
{
try {
InputStream stream = new FileInputStream(persp.getCustomFile());
BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "utf-8")); //$NON-NLS-1$
// Restore the layout state.
IMemento memento = XMLMemento.createReadRoot(reader);... |
private boolean updateCommand(Command command) {
boolean updated = false;
SortedSet contextBindings = (SortedSet) contextBindingsByCommandId.get(command.getId());
updated |= command.setActive(contextBindings != null ? inContext(contextBindings) : false);
ICommandDefinition commandDefinition = (ICommandDefiniti... | private boolean updateCommand(Command command) {
boolean updated = false;
SortedSet contextBindings = (SortedSet) contextBindingsByCommandId.get(command.getId());
updated |= command.setActive(contextBindings != null ? inContext(contextBindings) : true);
ICommandDefinition commandDefinition = (ICommandDefinitio... |
private int port;
/**
* UnicastRemoteObjectClass
*/
private static String className = "org.objectweb.jeremie.libs.binding.moa.UnicastRemoteObject";
| private int port;
/**
* UnicastRemoteObjectClass
*/
private static String className = "org.objectweb.jeremie.binding.moa.UnicastRemoteObject";
|
public void search(IWorkspace workspace, ISearchPattern searchPattern, IJavaSearchScope scope, IJavaSearchResultCollector resultCollector) throws JavaModelException {
long start = -1;
if (VERBOSE) {
start = System.currentTimeMillis();
System.out.println("Searching for " + searchPattern + " in " + scope); //$NON... | public void search(IWorkspace workspace, ISearchPattern searchPattern, IJavaSearchScope scope, IJavaSearchResultCollector resultCollector) throws JavaModelException {
long start = -1;
if (VERBOSE) {
start = System.currentTimeMillis();
System.out.println("Searching for " + searchPattern + " in " + scope); //$NON... |
private void deletePackageFragment(IPackageFragment frag)
throws JavaModelException {
IResource res = frag.getResource();
if (res != null && res.getType() == IResource.FOLDER) {
// collect the children to remove
IJavaElement[] childrenOfInterest = frag.getChildren();
if (childrenOfInterest.length > 0) {
IRe... | private void deletePackageFragment(IPackageFragment frag)
throws JavaModelException {
IResource res = frag.getResource();
if (res != null && res.getType() == IResource.FOLDER) {
// collect the children to remove
IJavaElement[] childrenOfInterest = frag.getChildren();
if (childrenOfInterest.length > 0) {
IRe... |
public void append(LoggingEvent event) {
StringBuffer sbuf = new StringBuffer();
sbuf.append(layout.format(event));
if(layout.ignoresThrowable()) {
String[] s = event.getThrowableStrRep();
if (s != null) {
int len = s.length;
for(int i = 0; i < len; i++) {
sbuf.append(s[0]);
}
... | public void append(LoggingEvent event) {
StringBuffer sbuf = new StringBuffer();
sbuf.append(layout.format(event));
if(layout.ignoresThrowable()) {
String[] s = event.getThrowableStrRep();
if (s != null) {
int len = s.length;
for(int i = 0; i < len; i++) {
sbuf.append(s[i]);
}
... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
FieldAccess(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
*/
FieldAccess(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(... |
public void update() {
IPresentablePart part = site.getSelectedPart();
setEnabled(part != null && site.isMoveable(part));
}
| public void update() {
IPresentablePart part = site.getSelectedPart();
setEnabled(part != null && site.isPartMoveable(part));
}
|
public WelcomeEditorCopyAction(WelcomeEditor editor) {
editorPart = editor;
setText(WorkbenchMessages.getString("WelcomeEditor.copy.text"));
}
| public WelcomeEditorCopyAction(WelcomeEditor editor) {
editorPart = editor;
setText(WorkbenchMessages.getString("WelcomeEditor.copy.text")); //$NON-NLS-1$
}
|
protected void enterType(TypeInfo typeInfo) {
if (fBuildingType) {
int[] sourceRange = {typeInfo.declarationStart, -1}; // will be fixed in the exit
int[] nameRange = new int[] {typeInfo.nameSourceStart, typeInfo.nameSourceEnd};
fNode = new DOMType(fDocument, sourceRange, new String(typeInfo.name), nameRange,
... | protected void enterType(TypeInfo typeInfo) {
if (fBuildingType) {
int[] sourceRange = {typeInfo.declarationStart, -1}; // will be fixed in the exit
int[] nameRange = new int[] {typeInfo.nameSourceStart, typeInfo.nameSourceEnd};
fNode = new DOMType(fDocument, sourceRange, new String(typeInfo.name), nameRange,
... |
extends BaseModification
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Turbine classes
import org.apache.turbine.om.*;
import org.apache.turbine.om.peer.BasePeer;
import org.apache.turbine.util.db.Criteria;
import org.apache.turbine.util.ObjectUtils;
import org.apache.turbine.util.StringUtils;
... | extends BaseModification
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Turbine classes
import org.apache.turbine.om.*;
import org.apache.turbine.om.peer.BasePeer;
import org.apache.turbine.util.db.Criteria;
import org.apache.turbine.util.ObjectUtils;
import org.apache.turbine.util.StringUtils;
... |
public boolean encloses(IJavaElement element) {
if (this.hierarchy == null) {
if (this.focusType.equals(element.getAncestor(IJavaElement.TYPE))) {
return true;
} else {
if (this.needsRefresh) {
try {
this.initialize();
} catch (JavaModelException e) {
return false;
}
} el... | public boolean encloses(IJavaElement element) {
if (this.hierarchy == null) {
if (this.focusType.equals(element.getAncestor(IJavaElement.TYPE))) {
return true;
} else {
if (this.needsRefresh) {
try {
this.initialize();
} catch (JavaModelException e) {
return false;
}
} el... |
public IProblem createProblem(
char[] fileName,
int problemId,
String[] problemArguments,
String[] messageArguments,
int severity,
int problemStartPosition,
int problemEndPosition,
int lineNumber,
ReferenceContext refContext,
CompilationResult unitResult) {
IProblem pb = ... | public IProblem createProblem(
char[] fileName,
int problemId,
String[] problemArguments,
String[] messageArguments,
int severity,
int problemStartPosition,
int problemEndPosition,
int lineNumber,
ReferenceContext refContext,
CompilationResult unitResult) {
IProblem pb = ... |
public IPath[] enclosingProjectsAndJars() {
try {
Vector paths = new Vector();
IJavaModel javaModel = JavaModelManager.getJavaModel(ResourcesPlugin.getWorkspace());
IWorkspaceRoot root = javaModel.getWorkspace().getRoot();
for (int i = 0; i < this.elementCount; i++){
IResource element = this.elements[i];
... | public IPath[] enclosingProjectsAndJars() {
try {
Vector paths = new Vector();
IJavaModel javaModel = JavaModelManager.getJavaModel(ResourcesPlugin.getWorkspace());
IWorkspaceRoot root = javaModel.getWorkspace().getRoot();
for (int i = 0; i < this.elementCount; i++){
IResource element = this.elements[i];
... |
public boolean visit(IResourceProxy proxy) throws CoreException {
IResource resource = null;
switch(proxy.getType()) {
case IResource.FILE :
if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName()) ||
org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.g... | public boolean visit(IResourceProxy proxy) throws CoreException {
IResource resource = null;
switch(proxy.getType()) {
case IResource.FILE :
if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName()) ||
org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.g... |
private AbstractMessageFolder getSourceFolder() {
int uid = getConfiguration().getInteger("property", "source_uid");
| protected void applySearch() throws Exception {
AbstractMessageFolder srcFolder = getSourceFolder();
XmlElement filter = getConfiguration().getRoot().getElement("filter");
if (filter == null) {
filter = new XmlElement("filter");
filter.addAttribute("description", "new filter");
filter.addAttribute("en... |
public
update(InputStream in) throws IOException {
Vector inputs = new Vector();
Vector istreams = new Vector();
query = new Message();
query.getHeader().setOpcode(Opcode.UPDATE);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
inputs.addElement(br);
istreams.a... | public
update(InputStream in) throws IOException {
Vector inputs = new Vector();
Vector istreams = new Vector();
query = new Message();
query.getHeader().setOpcode(Opcode.UPDATE);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
inputs.addElement(br);
istreams.a... |
public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
TypeBinding methodType =
(methodScope.referenceContext instanceof AbstractMethodDeclaration)
? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
? ... | public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
TypeBinding methodType =
(methodScope.referenceContext instanceof AbstractMethodDeclaration)
? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
? ... |
public void updateComponents(boolean b) {
if (b) {
MailboxInfo info = folder.getMessageFolderInfo();
nameTextField.setText(folder.getName());
totalLabel2.setText(Integer.toString(info.getExists()));
unreadLabel2.setText(Integer.toString(info.getUnseen()));
recentLabel2.setText(Integer.toString(info.... | public void updateComponents(boolean b) {
if (b) {
MailboxInfo info = folder.getMessageFolderInfo();
nameTextField.setText(folder.getName());
totalLabel2.setText(Integer.toString(info.getExists()));
unreadLabel2.setText(Integer.toString(info.getUnseen()));
recentLabel2.setText(Integer.toString(info.... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
try {
IIndex index = manager.getIndex(this.indexedContainer);
if (index == null)
return COMPLETE;
/* ensure no concurrent write access to index */
ReadWrit... | public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
try {
IIndex index = manager.getIndex(this.indexedContainer, true /*reuse index file*/, true /*create if none*/);
if (index == null)
return COMPLETE;
/* ensur... |
public UMLAction(String name, boolean global, boolean hasIcon) {
super(localize(name));
if (hasIcon) {
Icon icon = Util.loadIconResource(name);
if (icon != null) putValue(Action.SMALL_ICON, icon);
else { System.out.println("icon not found: " + name); }
}
putValue(Action.SHORT_DESCRIP... | public UMLAction(String name, boolean global, boolean hasIcon) {
super(localize(name));
if (hasIcon) {
Icon icon = ResourceLoader.lookupIconResource(name);
if (icon != null) putValue(Action.SMALL_ICON, icon);
else { System.out.println("icon not found: " + name); }
}
putValue(Action.S... |
public void contextInit(Context ctx) {
Hashtable loadableServlets = new Hashtable();
init(ctx,loadableServlets);
Vector orderedKeys = new Vector();
Enumeration e= loadableServlets.keys();
// order keys
while (e.hasMoreElements()) {
Integer key = (Integer)e.nextElement();
int slot = -1;
fo... | public void contextInit(Context ctx) {
Hashtable loadableServlets = new Hashtable();
init(ctx,loadableServlets);
Vector orderedKeys = new Vector();
Enumeration e= loadableServlets.keys();
// order keys
while (e.hasMoreElements()) {
Integer key = (Integer)e.nextElement();
int slot = -1;
fo... |
protected void recordParticipantResult(CompilationParticipantResult result) {
// any added/changed/deleted generated files have already been taken care
// just record the problems and dependencies - do not expect there to be many
// must be called after we're finished with the compilation unit results but before inc... | protected void recordParticipantResult(CompilationParticipantResult result) {
// any added/changed/deleted generated files have already been taken care
// just record the problems and dependencies - do not expect there to be many
// must be called after we're finished with the compilation unit results but before inc... |
public boolean checkDeprecation(int annotationStart, int annotationEnd) {
boolean foundDeprecated = false;
try {
this.source = this.sourceParser.scanner.source;
if (this.checkAnnotation) {
this.annotation = new Annotation(annotationStart, annotationEnd);
this.astLengthPtr = -1;
this.astPtr = -1;... | public boolean checkDeprecation(int annotationStart, int annotationEnd) {
boolean foundDeprecated = false;
try {
this.source = this.sourceParser.scanner.source;
if (this.checkAnnotation && this.scanner.source != null) {
this.annotation = new Annotation(annotationStart, annotationEnd);
this.astLength... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.