buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
import org.columba.api.command.ICommandReference;
// The contents of this file are subject to the Mozilla Public License Version
// 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed und... | import org.columba.api.command.ICommandReference;
// The contents of this file are subject to the Mozilla Public License Version
// 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed und... |
public
void append(LoggingEvent event) {
if(!checkEntryConditions()) {
return;
}
event.getThreadName();
event.getNDC();
if(locationInfo) {
event.setLocationInformation();
}
cb.add(event);
if(evaluator.isTriggeringEvent(event)) {
sendBuffer();
}
}
| public
void append(LoggingEvent event) {
if(!checkEntryConditions()) {
return;
}
event.getThreadName();
event.getNDC();
if(locationInfo) {
event.getLocationInformation();
}
cb.add(event);
if(evaluator.isTriggeringEvent(event)) {
sendBuffer();
}
}
|
public void selectionChanged(SelectionChangedEvent e) {
if( ((MessageSelectionChangedEvent)e).getUids().length == 1 ) {
/*
getMailFrameController()
.attachmentController
.getAttachmentSelectionManager()
.setFolder(treeNode);
getMailFrameController()
.attachmentController
.getAttachmentSele... | public void selectionChanged(SelectionChangedEvent e) {
if( ((MessageSelectionChangedEvent)e).getUids().length == 1 ) {
/*
getMailFrameController()
.attachmentController
.getAttachmentSelectionManager()
.setFolder(treeNode);
getMailFrameController()
.attachmentController
.getAttachmentSele... |
public void initializeScanner(){
this.scanner = new SelectionScanner(this.assertMode);
}
| public void initializeScanner(){
this.scanner = new SelectionScanner(this.sourceLevel);
}
|
public MethodBinding tiebreakMethod() {
if (this.tiebreakMethod == null) {
this.tiebreakMethod = new ParameterizedGenericMethodBinding(this.originalMethod, (RawTypeBinding)null, this.environment);
}
return this.tiebreakMethod;
}
| public MethodBinding tiebreakMethod() {
if (this.tiebreakMethod == null) {
this.tiebreakMethod = this.isRaw ? this : new ParameterizedGenericMethodBinding(this.originalMethod, (RawTypeBinding)null, this.environment);
}
return this.tiebreakMethod;
}
|
public void actionPerformed(ActionEvent evt)
{
if(evt.getSource() == mode)
{
saveMode();
selectMode();
}
else if(evt.getSource() == useDefaults)
{
modeProps[mode.getSelectedIndex()].useDefaults =
useDefaults.isSelected();
updateEnabled();
}
}
} //}}}
//{{{ ModeProperties ... | public void actionPerformed(ActionEvent evt)
{
if(evt.getSource() == mode)
{
saveMode();
selectMode();
}
else if(evt.getSource() == useDefaults)
{
modeProps[mode.getSelectedIndex() - 1].useDefaults =
useDefaults.isSelected();
updateEnabled();
}
}
} //}}}
//{{{ ModePropert... |
protected void registerEnablement() {
enablementRef = getEvaluationService().addEvaluationListener(
getEnabledWhenExpression(), getEnablementListener(),
PROP_ENABLED);
}
| protected void registerEnablement() {
enablementRef = getEvaluationService().addEvaluationListener(
getEnabledWhenExpression(), getEnablementListener(),
PROP_ENABLED, null);
}
|
public String toString() {
return "TypeNode("/*nonNLS*/ + fType.getFileName() + ")"/*nonNLS*/;
}
| public String toString() {
return "TypeNode(" + fType.getFileName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
|
private void pushFile(File file, String encoding)
throws ParseException, FileNotFoundException
{
// Default encoding if needed:
if (encoding == null) {
encoding = "8859_1";
// XXX - longer term, this should really be:
// System.getProperty("file.encoding", "8859_1");
... | private void pushFile(File file, String encoding)
throws ParseException, FileNotFoundException
{
// Default encoding if needed:
if (encoding == null) {
encoding = "8859_1";
// XXX - longer term, this should really be:
// System.getProperty("file.encoding", "8859_1");
... |
public void load(WorkerStatusController worker) throws Exception {
ColumbaLogger.log.info("loading header-cache=" + headerFile);
FileInputStream istream = new FileInputStream(headerFile.getPath());
ObjectInputStream p = new ObjectInputStream(istream);
int capacity = p.readInt();
ColumbaLogger.log.info("ca... | public void load(WorkerStatusController worker) throws Exception {
ColumbaLogger.log.info("loading header-cache=" + headerFile);
FileInputStream istream = new FileInputStream(headerFile.getPath());
ObjectInputStream p = new ObjectInputStream(istream);
int capacity = p.readInt();
ColumbaLogger.log.info("ca... |
private ASTNode.NodeList arguments =
new ASTNode.NodeList(ARGUMENTS_PROPERTY);
/**
* Creates a new AST node for a "super" method invocation expression owned
* by the given AST. By default, no qualifier, no type arguments,
* an unspecified, but legal, method name, and an empty list of arguments.
*
* @para... | private ASTNode.NodeList arguments =
new ASTNode.NodeList(ARGUMENTS_PROPERTY);
/**
* Creates a new AST node for a "super" method invocation expression owned
* by the given AST. By default, no qualifier, no type arguments,
* an unspecified, but legal, method name, and an empty list of arguments.
*
* @para... |
public void record(IProblem problem, CompilationResult unitResult) {
requestor.acceptProblem(problem);
}
},
false,
options.assertMode);
this.requestor = requestor;
intArrayStack = new int[30][];
this.options = options;
}
| public void record(IProblem problem, CompilationResult unitResult) {
requestor.acceptProblem(problem);
}
},
false,
options.sourceLevel >= CompilerOptions.JDK1_4);
this.requestor = requestor;
intArrayStack = new int[30][];
this.options = options;
}
|
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameController()).getTableSelection();
r[0].setMarkVariant(MarkMessageCommand.MARK_AS_FLAGGED);
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_FLAGGED);
MarkMessageCommand c = new MarkMessageCommand(r);
MainInterface.processor.addOp(c);
}
|
private boolean isAffectedByJavaProject(IJavaElementDelta delta, IJavaElement element) {
switch (delta.getKind()) {
case IJavaElementDelta.ADDED :
try {
// if the added project is on the classpath, then the hierarchy has changed
IClasspathEntry[] classpath = this.javaProject().getExpandedClasspath(true);
... | private boolean isAffectedByJavaProject(IJavaElementDelta delta, IJavaElement element) {
switch (delta.getKind()) {
case IJavaElementDelta.ADDED :
try {
// if the added project is on the classpath, then the hierarchy has changed
IClasspathEntry[] classpath = ((JavaProject)this.javaProject()).getExpandedCl... |
public static final char[][] splitOn(char divider, char[] array, int start, int end) {
int length = array == null ? 0 : array.length;
if (length == 0)
return TypeConstants.NoCharChar;
int wordCount = 1;
for (int i = start; i < end; i++)
if (array[i] == divider)
wordCount++;
char[][] split = new char[wordCo... | public static final char[][] splitOn(char divider, char[] array, int start, int end) {
int length = array == null ? 0 : array.length;
if (length == 0 || start > end)
return TypeConstants.NoCharChar;
int wordCount = 1;
for (int i = start; i < end; i++)
if (array[i] == divider)
wordCount++;
char[][] split = ... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
if (!project.isOpen())
return COMPLETE; // nothing to do
IIndex index = manager.getIndex(project.getFullPath());
if (index == null)
return COMPLETE;
ReadWriteMon... | public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
if (!project.isOpen())
return COMPLETE; // nothing to do
IIndex index = manager.getIndex(project.getFullPath(), true /*reuse index file*/, true /*create if none*/);
i... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameController()).getTableSelection();
MainInterface.processor.addOp(new ReplyAsAttachmentCommand(r));
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new ReplyAsAttachmentCommand(r));
}
|
public void init(IEditorSite site, MultiEditorInput input) throws PartInitException {
setInput(input);
setSite(site);
setTitle(input.getName());
setTitleToolTip(input.getToolTipText());
}
| public void init(IEditorSite site, MultiEditorInput input) throws PartInitException {
setInput(input);
setSite(site);
setPartName(input.getName());
setTitleToolTip(input.getToolTipText());
}
|
protected void indexFile(IDocument document) throws IOException {
// Add the name of the file to the index
output.addDocument(document);
// Create a new Parser
SourceIndexerRequestor requestor = new SourceIndexerRequestor(this, document);
SourceElementParser parser = new SourceElementParser(requestor, problemFac... | protected void indexFile(IDocument document) throws IOException {
// Add the name of the file to the index
output.addDocument(document);
// Create a new Parser
SourceIndexerRequestor requestor = new SourceIndexerRequestor(this, document);
SourceElementParser parser = new SourceElementParser(requestor, problemFac... |
public void updateGUI() throws Exception {
MailInterface.treeModel.nodeStructureChanged(parentFolder);
if (vfolder != null) {
//vfolder.showFilterDialog((AbstractMailFrameController) getFrameMediator());
new ConfigFrame(getFrameMediator().getView().getFrame(), vfolder);
... | public void updateGUI() throws Exception {
MailInterface.treeModel.nodeStructureChanged(parentFolder);
if (vfolder != null) {
//vfolder.showFilterDialog((AbstractMailFrameController) getFrameMediator());
new ConfigFrame(getFrameMediator(), vfolder);
}
}
|
protected String getDelimiter(CommentLine predecessor, CommentLine successor, CommentRange previous, CommentRange next, String indentation) {
final String delimiter= super.getDelimiter(predecessor, successor, previous, next, indentation);
if (previous != null) {
// Blank line before <pre> tag
if (previous... | protected String getDelimiter(CommentLine predecessor, CommentLine successor, CommentRange previous, CommentRange next, String indentation) {
final String delimiter= super.getDelimiter(predecessor, successor, previous, next, indentation);
if (previous != null) {
// Blank line before <pre> tag
if (previous... |
protected String getMainTaskName() {
return Util.bind("operation.copyElementProgress"); //$NON-NLS-1$
}
| protected String getMainTaskName() {
return org.eclipse.jdt.internal.core.util.Util.bind("operation.copyElementProgress"); //$NON-NLS-1$
}
|
public BeanShellErrorDialog(View view, String message)
{
super(view,jEdit.getProperty("beanshell-error.title"),true);
JPanel content = new JPanel(new BorderLayout(12,12));
content.setBorder(new EmptyBorder(12,12,12,12));
setContentPane(content);
Box iconBox = new Box(BoxLayout.Y_AXIS);
iconBox.add(new J... | public BeanShellErrorDialog(View view, String message)
{
super(view,jEdit.getProperty("beanshell-error.title"),true);
JPanel content = new JPanel(new BorderLayout(12,12));
content.setBorder(new EmptyBorder(12,12,12,12));
setContentPane(content);
Box iconBox = new Box(BoxLayout.Y_AXIS);
iconBox.add(new J... |
import org.apache.torque.om.Persistent;
package org.tigris.scarab.om;
/* ================================================================
* Copyright (c) 2000-2001 CollabNet. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... | import org.apache.torque.om.Persistent;
package org.tigris.scarab.om;
/* ================================================================
* Copyright (c) 2000-2001 CollabNet. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... |
public String getMessage() {
Throwable exception = getException();
if (exception == null) {
switch (getCode()) {
case CORE_EXCEPTION :
return Util.bind("status.coreException"); //$NON-NLS-1$
case BUILDER_INITIALIZATION_ERROR:
return Util.bind("build.initializationError"); //$NON-NLS-1$
c... | public String getMessage() {
Throwable exception = getException();
if (exception == null) {
switch (getCode()) {
case CORE_EXCEPTION :
return Util.bind("status.coreException"); //$NON-NLS-1$
case BUILDER_INITIALIZATION_ERROR:
return Util.bind("build.initializationError"); //$NON-NLS-1$
c... |
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 MethodBinding[] methods() {
if ((modifiers & AccUnresolved) == 0)
return this.methods;
try {
MethodBinding[] originalMethods = this.type.methods();
int length = originalMethods.length;
MethodBinding[] parameterizedMethods = new MethodBinding[length];
for (int i = 0; i < length; i... | public MethodBinding[] methods() {
if ((modifiers & AccUnresolved) == 0)
return this.methods;
try {
MethodBinding[] originalMethods = this.type.methods();
int length = originalMethods.length;
MethodBinding[] parameterizedMethods = new MethodBinding[length];
for (int i = 0; i < length; i... |
protected void process(PossibleMatch possibleMatch, boolean bindingsWereCreated) throws CoreException {
this.currentPossibleMatch = possibleMatch;
CompilationUnitDeclaration unit = possibleMatch.parsedUnit;
try {
if (unit.isEmpty()) {
if (this.currentPossibleMatch.openable instanceof ClassFile) {
ClassFile ... | protected void process(PossibleMatch possibleMatch, boolean bindingsWereCreated) throws CoreException {
this.currentPossibleMatch = possibleMatch;
CompilationUnitDeclaration unit = possibleMatch.parsedUnit;
try {
if (unit.isEmpty()) {
if (this.currentPossibleMatch.openable instanceof ClassFile) {
ClassFile ... |
public int getScrollableUnitIncrement(Rectangle arg0, int arg1, int arg2) {
Font textFont = Config.getOptionsConfig().getGuiItem().getTextFont();
return textFont.getSize() * 5;
}
| public int getScrollableUnitIncrement(Rectangle arg0, int arg1, int arg2) {
Font textFont = Config.getOptionsConfig().getGuiItem().getTextFont();
return textFont.getSize() * 3;
}
|
public CompositeWithClass(Class<?> type) {
super(type);
}
| public CompositeWithClass(Class<?> type) {
super(type, "something");
}
|
int FORCE_IMMEDIATE_SEARCH = IJob.ForceImmediate; // TODO: may discard for 3.0, since it isn't used anyway
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are... | int FORCE_IMMEDIATE_SEARCH = IJob.ForceImmediate; // TODO: may discard for 3.0, since it isn't used anyway
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are... |
public TypeBinding resolveTypeExpecting(
BlockScope scope,
TypeBinding expectedTb) {
TypeBinding thisTb = this.resolveType(scope);
if (thisTb == null)
return null;
if (!scope.areTypesCompatible(thisTb, expectedTb)) {
scope.problemReporter().typeMismatchError(thisTb, expectedTb, this);
return null;
... | public TypeBinding resolveTypeExpecting(
BlockScope scope,
TypeBinding expectedTb) {
TypeBinding thisTb = this.resolveType(scope);
if (thisTb == null)
return null;
if (!Scope.areTypesCompatible(thisTb, expectedTb)) {
scope.problemReporter().typeMismatchError(thisTb, expectedTb, this);
return null;
... |
protected boolean addDependency(ScopedURLClassLoader source, ScopedURLClassLoader target) {
// no rescursions necessary (but not volatile for the code)
if(source !=null && target!=null && !source.equals(target)) {
Set deps=(Set) dependencies.get(target);
... | protected boolean addDependency(ScopedURLClassLoader source, ScopedURLClassLoader target) {
// no rescursions necessary (but not volatile for the code)
if(source !=null && target!=null && !source.equals(target)) {
Set deps=(Set) dependencies.get(target);
... |
private static RepositorySelector repositorySelector;
static {
// By default we use a DefaultRepositorySelector which always returns 'h'.
Hierarchy h = new Hierarchy(new RootCategory(Level.DEBUG));
repositorySelector = new DefaultRepositorySelector(h);
Logger logger = LogManager.getLoggerRepositor... | private static RepositorySelector repositorySelector;
static {
// By default we use a DefaultRepositorySelector which always returns 'h'.
Hierarchy h = new Hierarchy(new RootCategory(Level.DEBUG));
repositorySelector = new DefaultRepositorySelector(h);
Logger logger = LogManager.getLoggerRepositor... |
public final boolean isTypeUseDeprecated(TypeBinding type, Scope scope) {
if (type.isArrayType())
type = ((ArrayBinding) type).leafComponentType;
if (type.isBaseType())
return false;
ReferenceBinding refType = (ReferenceBinding) type;
if (refType.isPrivate() && !scope.isDefinedInType(refType)) {
//... | public final boolean isTypeUseDeprecated(TypeBinding type, Scope scope) {
if (type.isArrayType())
type = ((ArrayBinding) type).leafComponentType;
if (type.isBaseType())
return false;
ReferenceBinding refType = (ReferenceBinding) type;
if (refType.isPrivate() && !scope.isDefinedInType(refType)) {
//... |
public TypeBinding resolveType(BlockScope scope) {
// field and/or local are done before type lookups
// the only available value for the restrictiveFlag BEFORE
// the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField
this.actualReceiverType = scope.enclosingSourceType();
constant = Constant.NotAConst... | public TypeBinding resolveType(BlockScope scope) {
// field and/or local are done before type lookups
// the only available value for the restrictiveFlag BEFORE
// the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField
this.actualReceiverType = scope.enclosingSourceType();
constant = Constant.NotAConst... |
public void acceptMethod(
char[] declaringTypePackageName,
char[] declaringTypeName,
String enclosingDeclaringTypeSignature,
char[] selector,
char[][] parameterPackageNames,
char[][] parameterTypeNames,
String[] parameterSignatures,
char[][] typeParameterNames,
char[][][] typeParameterBoundNames,
bo... | public void acceptMethod(
char[] declaringTypePackageName,
char[] declaringTypeName,
String enclosingDeclaringTypeSignature,
char[] selector,
char[][] parameterPackageNames,
char[][] parameterTypeNames,
String[] parameterSignatures,
char[][] typeParameterNames,
char[][][] typeParameterBoundNames,
bo... |
public IPath[] getIndexLocations() {
if (this.indexLocations == null) {
this.initializeIndexLocations();
}
return this.indexLocations;
}
| public IPath[] getIndexLocations() {
if (this.indexLocations == null) {
initializeIndexLocations();
}
return this.indexLocations;
}
|
public
void setThreshold(Level threshold) {
this.threshold = threshold;
}
| public
void setThreshold(Priority threshold) {
this.threshold = threshold;
}
|
public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean recurseInContainers){
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IPath path = entry.getPath();
// Build some common strings for status mes... | public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean recurseInContainers){
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IPath path = entry.getPath();
// Build some common strings for status mes... |
public ReferenceBinding findSuperTypeErasingTo(ReferenceBinding erasure) {
if (this == erasure) return this;
ReferenceBinding currentType = this;
if (erasure.isClass()) {
while ((currentType = currentType.superclass()) != null) {
if (currentType == erasure || currentType.erasure() == erasure) return c... | public ReferenceBinding findSuperTypeErasingTo(ReferenceBinding erasure) {
if (this == erasure) return this;
ReferenceBinding currentType = this;
if ((erasure.modifiers & AccInterface) == 0) {
while ((currentType = currentType.superclass()) != null) {
if (currentType == erasure || currentType.erasure(... |
public static final int ELEMENT_NOT_ON_CLASSPATH = 1005;
} | public static final int ELEMENT_NOT_ON_CLASSPATH = 1006;
} |
public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
this.resolvedType = qualification.resolveType(scope);
if (this.resolvedType == null) return null;
// the qualification MUST exactly match some enclosing type name
// Its possible to qualify 'this' by the name of the current class
... | public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
this.resolvedType = this.qualification.resolveType(scope);
if (this.resolvedType == null) return null;
// the qualification MUST exactly match some enclosing type name
// Its possible to qualify 'this' by the name of the current cl... |
public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
this.tagBits |= TagBits.IsArrayType;
this.leafComponentType = type;
this.dimensions = dimensions;
this.environment = environment;
if (type instanceof UnresolvedReferenceBinding)
((UnresolvedReferenceBinding) type).addWrapper(t... | public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
this.tagBits |= TagBits.IsArrayType;
this.leafComponentType = type;
this.dimensions = dimensions;
this.environment = environment;
if (type instanceof UnresolvedReferenceBinding)
((UnresolvedReferenceBinding) type).addWrapper(t... |
public static org.eclipse.jdt.core.util.IClassFileDisassembler createDefaultClassFileDisassembler(){
class DeprecatedDisassembler extends Disassembler implements org.eclipse.jdt.core.util.IClassFileDisassembler {};
return new DeprecatedDisassembler();
}
| public static org.eclipse.jdt.core.util.IClassFileDisassembler createDefaultClassFileDisassembler(){
class DeprecatedDisassembler extends Disassembler implements org.eclipse.jdt.core.util.IClassFileDisassembler {}
return new DeprecatedDisassembler();
}
|
public void updateActionBars() {
if (updateDisabled || updatesDeferred()) {
return;
}
// updateAll required in order to enable accelerators on pull-down menus
getMenuBarManager().updateAll(false);
getCoolBarManager().update(false);
getStatusLineManager().u... | public void updateActionBars() {
if (updateDisabled || updatesDeferred()) {
return;
}
// updateAll required in order to enable accelerators on pull-down menus
getMenuBarManager().update(false);
getCoolBarManager().update(false);
getStatusLineManager().upda... |
public static void checkInvocationArguments(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding method, Expression[] arguments, TypeBinding[] argumentTypes, boolean argsContainCast, InvocationSite invocationSite) {
boolean unsafeWildcardInvocation = false;
TypeBinding[] params = method.p... | public static void checkInvocationArguments(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding method, Expression[] arguments, TypeBinding[] argumentTypes, boolean argsContainCast, InvocationSite invocationSite) {
boolean unsafeWildcardInvocation = false;
TypeBinding[] params = method.p... |
public TypeBinding resolveType(BlockScope scope) {
// field and/or local are done before type lookups
// the only available value for the restrictiveFlag BEFORE
// the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField
this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
constant ... | public TypeBinding resolveType(BlockScope scope) {
// field and/or local are done before type lookups
// the only available value for the restrictiveFlag BEFORE
// the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField
this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
constant ... |
private boolean didMerge=false;
MessageBytes queryMB;
MimeHeaders headers;
UDecoder urlDec;
MessageBytes decodedQuery=new MessageBytes();
| private boolean didMerge=false;
MessageBytes queryMB;
MimeHeaders headers;
UDecoder urlDec;
MessageBytes decodedQuery=MessageBytes.newInstance();
|
public void tabFocusHide() {
if (getControl() == null) return;
setActive(isActiveWorkbook());
}
| public void tabFocusHide() {
if (getControl() == null) return;
setActive(false /*isActiveWorkbook()*/);
}
|
public final void createPartControl(Composite parent) {
Composite pageContainer = createPageContainer(parent);
this.container = createContainer(pageContainer);
createPages();
// set the active page (page 0 by default), unless it has already been
// done
if (getActivePage() == -1) {
getTabFolder().setSel... | public final void createPartControl(Composite parent) {
Composite pageContainer = createPageContainer(parent);
this.container = createContainer(pageContainer);
createPages();
// set the active page (page 0 by default), unless it has already been
// done
if (getActivePage() == -1) {
setActivePage(0);
... |
List getRoleActivityBindingDefinitions();
/*******************************************************************************
* 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 Public License v1.0... | List getRoleActivityBindingDefinitions();
/*******************************************************************************
* 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 Public License v1.0... |
private IObjectActivityManager getObjectActivityManager() {
return
WorkbenchPlugin.getDefault().getWorkbench().
getActivityManager(IWorkbenchConstants.PL_EDITOR + getName() + getExtension(), true);
}
| private IObjectActivityManager getObjectActivityManager() {
return
WorkbenchPlugin.getDefault().getWorkbench().
getObjectActivityManager(IWorkbenchConstants.PL_EDITOR + getName() + getExtension(), true);
}
|
public void mouseExited(MouseEvent evt)
{
view.getStatus().setMessage(null);
}
};
Vector recentVector = BufferHistory.getBufferHistory();
if(recentVector.size() == 0)
{
add(GUIUtilities.loadMenuItem("no-recent"));
super.setMenuPopupVisible(b);
return;
}
/*
* While r... | public void mouseExited(MouseEvent evt)
{
view.getStatus().setMessage(null);
}
};
Vector recentVector = BufferHistory.getBufferHistory();
if(recentVector.size() == 0)
{
add(GUIUtilities.loadMenuItem("no-recent"));
super.setPopupMenuVisible(b);
return;
}
/*
* While r... |
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.expression.traverse(visitor, this.scope);
if (this.statements != null) {
int statementsLength = this.statements.length;
for (int i = 0; i < statementsLength; i++)
this.statements[i... | public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.expression.traverse(visitor, blockScope);
if (this.statements != null) {
int statementsLength = this.statements.length;
for (int i = 0; i < statementsLength; i++)
this.statements[i... |
public void navigateUp() {
Object target = getTarget();
ProjectBrowser.TheInstance.setTarget(UmlHelper.getHelper().getOwner(getTarget()));
}
| public void navigateUp() {
Object target = getTarget();
ProjectBrowser.getInstance().setTarget(UmlHelper.getHelper().getOwner(getTarget()));
}
|
public TempFolder(String path) {
super();
String dir = path + "temp";
if (DiskIO.ensureDirectory(dir)) {
directoryFile = new File(dir);
}
headerList = new HeaderList();
messageList = new Hashtable();
setSearchEngine(new DefaultSearchEng... | public TempFolder(String path) {
super("temp-folder-name", "temp", path);
String dir = path + "temp";
if (DiskIO.ensureDirectory(dir)) {
directoryFile = new File(dir);
}
headerList = new HeaderList();
messageList = new Hashtable();
setS... |
public ReferenceBinding[] memberTypes() {
if (this.memberTypes == null) {
try {
ReferenceBinding[] originalMemberTypes = this.type.memberTypes();
int length = originalMemberTypes.length;
ReferenceBinding[] parameterizedMemberTypes = new ReferenceBinding[length];
boolean isRaw = this.isRawType();
... | public ReferenceBinding[] memberTypes() {
if (this.memberTypes == null) {
try {
ReferenceBinding[] originalMemberTypes = this.type.memberTypes();
int length = originalMemberTypes.length;
ReferenceBinding[] parameterizedMemberTypes = new ReferenceBinding[length];
// boolean isRaw = this.isRawType()... |
public int getModifiers() {
if (isClass()) {
ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
final int accessFlags = referenceBinding.getAccessFlags() & VALID_MODIFIERS;
if (referenceBinding.isAnonymousType()) {
return accessFlags & ~Modifier.FINAL;
}
return accessFlags;
} e... | public int getModifiers() {
if (isClass()) {
ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
final int accessFlags = referenceBinding.getAccessFlags() & VALID_MODIFIERS;
if (referenceBinding.isAnonymousType()) {
return accessFlags & ~Modifier.FINAL;
}
return accessFlags;
} e... |
public int getNodeType() {
return RETURN_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ReturnStatement result = new ReturnStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setLeadingComment(getLeadin... | public int getNodeType() {
return RETURN_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ReturnStatement result = new ReturnStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
... |
public int getNodeType() {
return VARIABLE_DECLARATION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
VariableDeclarationStatement result =
new VariableDeclarationStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLen... | public int getNodeType() {
return VARIABLE_DECLARATION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
VariableDeclarationStatement result =
new VariableDeclarationStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLen... |
public boolean trySave( boolean overwrite ) {
Object target = ProjectBrowser.TheInstance.getActiveDiagram();
if( target instanceof Diagram ) {
String defaultName = ((Diagram)target).getName();
defaultName = Util.stripJunk(defaultName);
// FIX - It's probably worthwhile to abstract and factor this ... | public boolean trySave( boolean overwrite ) {
Object target = ProjectBrowser.TheInstance.getActiveDiagram();
if( target instanceof Diagram ) {
String defaultName = ((Diagram)target).getName();
defaultName = Util.stripJunk(defaultName);
// FIX - It's probably worthwhile to abstract and factor this ... |
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = this.receiver.resolveType(scope);
if (this.receiverType == null){
... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = this.receiver.resolveType(scope);
if (this.receiverType == null){
... |
public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration methodDeclaration) {
checkCanceled();
if (methodDeclaration instanceof org.eclipse.jdt.internal.compiler.ast.AnnotationTypeMemberDeclaration) {
return convert((org.eclipse.jdt.internal.compiler.ast.AnnotationTypeMemberDeclara... | public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration methodDeclaration) {
checkCanceled();
if (methodDeclaration instanceof org.eclipse.jdt.internal.compiler.ast.AnnotationTypeMemberDeclaration) {
return convert((org.eclipse.jdt.internal.compiler.ast.AnnotationTypeMemberDeclara... |
protected void locatePackageDeclarations(SearchPattern searchPattern, SearchParticipant participant) throws CoreException {
if (searchPattern instanceof OrPattern) {
SearchPattern[] patterns = ((OrPattern) searchPattern).patterns;
for (int i = 0, length = patterns.length; i < length; i++)
locatePackageDeclarati... | protected void locatePackageDeclarations(SearchPattern searchPattern, SearchParticipant participant) throws CoreException {
if (searchPattern instanceof OrPattern) {
SearchPattern[] patterns = ((OrPattern) searchPattern).patterns;
for (int i = 0, length = patterns.length; i < length; i++)
locatePackageDeclarati... |
public String getMainTaskName(){
return Util.bind("operation.createPackageProgress"/*nonNLS*/);
}
| public String getMainTaskName(){
return Util.bind("operation.createPackageProgress"); //$NON-NLS-1$
}
|
public void execute(IProgressMonitor monitor) {
monitor.beginTask(COPY_PROGRESS_TITLE, 100);
try {
if (monitor.isCanceled())
throw new OperationCanceledException();
//Get a copy of the current description and modify it
IProjectDescription newDescription =
createDescription(project, proje... | public void execute(IProgressMonitor monitor) {
monitor.beginTask(COPY_PROGRESS_TITLE, 100);
try {
if (monitor.isCanceled())
throw new OperationCanceledException();
//Get a copy of the current description and modify it
IProjectDescription newDescription =
createDescription(project, proje... |
public short
getVersion() {
return (short) ((ttl >>> 16) & 0xFF);
}
byte []
rrToWire(Compression c) throws IOException {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
/* probably should dump bytes in here */
return bs.toByteArray();
}
| public short
getVersion() {
return (short) ((ttl >>> 16) & 0xFF);
}
byte []
rrToWire(Compression c, int index) throws IOException {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
/* probably should dump bytes in here */
return bs.toByteArray(... |
public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if ((targetType = type.resolveType(scope)) == null)
return null;
if (targetType.isArrayType()
&& ((ArrayBinding) targetType).leafComponentType == VoidBinding) {
scope.problemReporter().cannotAllocateVoidArray(this);
return ... | public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if ((targetType = type.resolveType(scope, true /* check bounds*/)) == null)
return null;
if (targetType.isArrayType()
&& ((ArrayBinding) targetType).leafComponentType == VoidBinding) {
scope.problemReporter().cannotAllocateVoi... |
public static String id() {
return "4.6-SNAPSHOT-20080908-1523";
}
| public static String id() {
return "4.5";
}
|
protected void activate() {
// determine my file, package, root, & project regions.
this.files = new Hashtable(5);
fProjectRegion = new Region();
fPackageRegion = new Region();
fRootRegion = new Region();
IType[] types = getAllTypes();
for (int i = 0; i < types.length; i++) {
IType type = types[i];
Openable... | protected void activate() {
// determine my file, package, root, & project regions.
this.files = new HashMap(5);
fProjectRegion = new Region();
fPackageRegion = new Region();
fRootRegion = new Region();
IType[] types = getAllTypes();
for (int i = 0; i < types.length; i++) {
IType type = types[i];
Openable o... |
public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "continue "/*nonNLS*/;
if (label != null )
s = s + new String(label) ;
return s;
}
| public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "continue "; //$NON-NLS-1$
if (label != null )
s = s + new String(label) ;
return s;
}
|
public boolean readViewerContributions(String id, ISelectionProvider prov,
IWorkbenchPart part) {
Assert.isTrue(part instanceof IViewPart || part instanceof IEditorPart);
provider = prov;
this.part = part;
readContributions(id, IWorkbenchRegistryConstants.TAG_VIEWER_CONTRIBUTIO... | public boolean readViewerContributions(String id, ISelectionProvider prov,
IWorkbenchPart part) {
Assert.isTrue(part instanceof IViewPart || part instanceof IEditorPart);
provider = prov;
this.part = part;
readContributions(id, IWorkbenchRegistryConstants.TAG_VIEWER_CONTRIBUTIO... |
protected void doConfigure(final ParseAction action, final LoggerRepository repository) {
// This line is needed here because there is logging from inside this method.
this.repository = repository;
selfInitialize(this.repository);
ExecutionContext ec = joranInterpreter.getExecutionContext();
... | protected void doConfigure(final ParseAction action, final LoggerRepository repository) {
// This line is needed here because there is logging from inside this method.
this.repository = repository;
selfInitialize(this.repository);
ExecutionContext ec = joranInterpreter.getExecutionContext();
... |
int R_ENUM_CONSTANT = 5;
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompa... | int R_ENUM_CONSTANT = 5;
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompa... |
private ServerSession processSession(Request request,
String sessionId, String source )
{
BaseInterceptor reqI[]= request.getContainer().
getInterceptors(Container.H_findSession);
ServerSession sess=null;
for( int i=0; i< reqI.length; i++ ) {
sess=reqI[i].findSession( request,
s... | private ServerSession processSession(Request request,
String sessionId, String source )
{
BaseInterceptor reqI[]= request.getContainer().
getInterceptors(Container.H_findSession);
ServerSession sess=null;
for( int i=0; i< reqI.length; i++ ) {
sess=reqI[i].findSession( request,
s... |
public ComposerMenu( ComposerInterface composerInterface )
{
JMenu fileMenu =
new JMenu(MailResourceLoader.getString("menu","mainframe", "menu_file")); //$NON-NLS-1$ //$NON-NLS-2$
fileMenu.setMnemonic(KeyEvent.VK_F);
CMenuItem newMenuItem;
newMenuItem =
new CMenuItem(composerInterface.composerActionLis... | public ComposerMenu( ComposerInterface composerInterface )
{
JMenu fileMenu =
new JMenu(MailResourceLoader.getString("menu","mainframe", "menu_file")); //$NON-NLS-1$ //$NON-NLS-2$
fileMenu.setMnemonic(KeyEvent.VK_F);
CMenuItem newMenuItem;
newMenuItem =
new CMenuItem(composerInterface.composerActionLis... |
public void actionPerformed(ActionEvent evt) {
AddressbookFrameController addressbookFrameController = (AddressbookFrameController) frameMediator;
Object uid = addressbookFrameController.getTable().getView()
.getSelectedUid();
if (uid == null)... | public void actionPerformed(ActionEvent evt) {
AddressbookFrameController addressbookFrameController = (AddressbookFrameController) frameMediator;
Object uid = addressbookFrameController.getTable().getView()
.getSelectedUid();
if (uid == null)... |
public SortingOptionsPlugin(MailFrameMediator mediator) {
super("sorting", mediator);
}
| public SortingOptionsPlugin(MailFrameMediator mediator) {
super("sorting", "SortingOptions", mediator);
}
|
private void setPlaceholderData(ASTNode node, PlaceholderData data) {
if (this.placeholderNodes == null) {
this.placeholderNodes= new IdentityHashMap();
}
this.placeholderNodes.put(node, data);
}
private static class PlaceholderData {
// base class
}
| private void setPlaceholderData(ASTNode node, PlaceholderData data) {
if (this.placeholderNodes == null) {
this.placeholderNodes= new IdentityHashMap();
}
this.placeholderNodes.put(node, data);
}
static class PlaceholderData {
// base class
}
|
public String toString() {
return (fProblems.length == 0 ? "" : "*") + "ConvertedCompilationResult(" + fPackageElement + ")"; //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-4$
}
| public String toString() {
return (fProblems.length == 0 ? ""/*nonNLS*/ : "*"/*nonNLS*/) + "ConvertedCompilationResult("/*nonNLS*/ + fPackageElement + ")"/*nonNLS*/;
}
|
public CrMergeClasses() {
setHeadline("Consider Combining Classes");
String s = "";
s += "The highlighted class, {name}, only participates in one association and that ";
s += "association is one-to-one with another class. Since instances of these ";
s += "two classes must always be created togeth... | public CrMergeClasses() {
setHeadline("Consider Combining Classes");
String s = "";
s += "The highlighted class, {name}, only participates in one association and that ";
s += "association is one-to-one with another class. Since instances of these ";
s += "two classes must always be created togeth... |
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
// get current message list selection
FolderCommandReference r = ((MailFrameMediator) getController())
.getTableSelection();
if (action.equals("NONE")) {
// remove color
// add color selection to reference
r.se... | public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
// get current message list selection
FolderCommandReference r = ((MailFrameMediator) getFrameMediator())
.getTableSelection();
if (action.equals("NONE")) {
// remove color
// add color selection to reference
r... |
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... | public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... |
private void correct(char[] argument) throws JavaModelException {
try {
String source = unit.getSource();
Scanner scanner = new Scanner();
scanner.setSource(source.toCharArray());
scanner.resetTo(correctionStart, correctionEnd);
int token = 0;
char[] argumentSource = new char[0];
// sear... | private void correct(char[] argument) throws JavaModelException {
try {
String source = unit.getSource();
Scanner scanner = new Scanner();
scanner.setSource(source.toCharArray());
scanner.resetTo(correctionStart, correctionEnd);
int token = 0;
char[] argumentSource = CharOperation.NO_CHAR;
... |
public void setTarget(Object o) {
_editorPane.setTarget(o);
Iterator it = detailsPanesByCompassPoint.values().iterator();
while(it.hasNext()) {
DetailsPane detailsPane = (DetailsPane)it.next();
detailsPane.setTarget(o);
}
if (o instanceof M... | public void setTarget(Object o) {
_editorPane.setTarget(o);
Iterator it = detailsPanesByCompassPoint.values().iterator();
while(it.hasNext()) {
DetailsPane detailsPane = (DetailsPane)it.next();
detailsPane.setTarget(o);
}
if (o instanceof M... |
KeySequence getKeySequence();
/*******************************************************************************
* 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 Public License v1.0
* which ac... | KeySequence getKeySequence();
/*******************************************************************************
* 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 Public License v1.0
* which ac... |
public void
addRecord(Record r) {
Name name = r.getName();
short type = r.getType();
RRset rrset = (RRset) findExactSet (name, type, dclass);
| public void
addRecord(Record r) {
Name name = r.getName();
short type = r.getRRsetType();
RRset rrset = (RRset) findExactSet (name, type, dclass);
|
protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
buffer.append(this.tabString(tab));
buffer.append("package "); //$NON-NLS-1$
toStringName(buffer);
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
}
}
| protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
buffer.append(tabString(tab));
buffer.append("package "); //$NON-NLS-1$
toStringName(buffer);
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
}
}
|
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = (FolderCommandReference[]) frameMediator
.getSelectionManager().getSelection("mail.tree");
MessageFolder folder = (MessageFolder) r[0].getFolder();
if (folder == null) { return; }
FolderItem... | public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = (FolderCommandReference[]) frameMediator
.getSelectionManager().getSelection("mail.tree");
MessageFolder folder = (MessageFolder) r[0].getFolder();
if (folder == null) { return; }
FolderItem... |
package org.jhotdraw.contrib.html;
/*
* @(#)HTMLContentProducerContext.java
*
* Project: JHotdraw - a GUI framework for technical drawings
* http://www.jhotdraw.org
* http://jhotdraw.sourceforge.net
* Copyright: © by the original author(s) and all contributors
* License: Lesser GNU Public License (LGPL)... | package org.jhotdraw.contrib.html;
/*
* @(#)HTMLContentProducerContext.java
*
* Project: JHotdraw - a GUI framework for technical drawings
* http://www.jhotdraw.org
* http://jhotdraw.sourceforge.net
* Copyright: © by the original author(s) and all contributors
* License: Lesser GNU Public License (LGPL)... |
public static IBinding[] resolve(
final IJavaElement[] elements,
int apiLevel,
Map compilerOptions,
IJavaProject javaProject,
WorkingCopyOwner owner,
IProgressMonitor monitor) {
final int length = elements.length;
final HashMap sourceElementPositions = new HashMap(); // a map from ICompilationUnit to ... | public static IBinding[] resolve(
final IJavaElement[] elements,
int apiLevel,
Map compilerOptions,
IJavaProject javaProject,
WorkingCopyOwner owner,
IProgressMonitor monitor) {
final int length = elements.length;
final HashMap sourceElementPositions = new HashMap(); // a map from ICompilationUnit to ... |
public String
getOS() {
return os;
}
void
rrToWire(DataByteOutputStream out, Compression c) {
if (cpu == null || os == null)
return;
out.writeString(cpu);
out.writeString(os);
}
| public String
getOS() {
return os;
}
void
rrToWire(DataByteOutputStream out, Compression c, boolean canonical) {
if (cpu == null || os == null)
return;
out.writeString(cpu);
out.writeString(os);
}
|
package org.eclipse.ui.commands;
/*******************************************************************************
* 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 Public License v1.0
* which... | package org.eclipse.ui.commands;
/*******************************************************************************
* 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 Public License v1.0
* which... |
protected Openable[] createElements(IResource resource) {
if (resource == null)
return null;
String extension = resource.getFileExtension();
extension = extension == null ? null : extension.toLowerCase();
if ("jar".equals(extension) //$NON-NLS-1$
|| "zip".equals(extension)) { //$NON-NLS-1$
IJavaProj... | protected Openable[] createElements(IResource resource) {
if (resource == null)
return null;
String extension = resource.getFileExtension();
extension = extension == null ? null : extension.toLowerCase();
if ("jar".equals(extension) //$NON-NLS-1$
|| "zip".equals(extension)) { //$NON-NLS-1$
IJavaProj... |
public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
try {
// if index is already cached, then do not perform any check
// MUST reset the IndexManager if a jar file is changed
Index index = manager.getInd... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
try {
// if index is already cached, then do not perform any check
// MUST reset the IndexManager if a jar file is changed
Index index = manager.getInd... |
public TypeBinding resolveType(BlockScope scope) {
// due to syntax lhs may be only a NameReference, a FieldReference or an ArrayReference
constant = NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
scope.problemReporter().expressionShouldBeAVariable(this.lhs);
return null;
}
... | public TypeBinding resolveType(BlockScope scope) {
// due to syntax lhs may be only a NameReference, a FieldReference or an ArrayReference
constant = NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
scope.problemReporter().expressionShouldBeAVariable(this.lhs);
return null;
}
... |
public final void addHandlerSubmission(
final HandlerSubmission handlerSubmission) {
/*
* Create the source priorities based on the conditions mentioned in the
* submission.
*/
int sourcePriorities = 0;
if (handlerSubmission.getActivePartId() != null) {
sourcePriorities |= ISources.ACTIVE_PART;
... | public final void addHandlerSubmission(
final HandlerSubmission handlerSubmission) {
/*
* Create the source priorities based on the conditions mentioned in the
* submission.
*/
int sourcePriorities = 0;
if (handlerSubmission.getActivePartId() != null) {
sourcePriorities |= ISources.ACTIVE_PART_ID;... |
private final IHandlerActivation resolveConflicts(final String commandId,
final SortedSet activations) {
// If we don't have any, then there is no match.
if (activations.isEmpty()) {
return null;
}
// Cycle over the activations, remembered the current best.
final Iterator activationItr = activations.i... | private final IHandlerActivation resolveConflicts(final String commandId,
final SortedSet activations) {
// If we don't have any, then there is no match.
if (activations.isEmpty()) {
return null;
}
// Cycle over the activations, remembered the current best.
final Iterator activationItr = activations.i... |
public String toStringExpression() {
return "<CompleteOnName:" + super.toStringExpression() + ">"; //$NON-NLS-2$ //$NON-NLS-1$
}
| public String toStringExpression() {
return "<CompleteOnName:"/*nonNLS*/ + super.toStringExpression() + ">"/*nonNLS*/;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.