buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public int NUM_CHANGES = 100; // number of separate document changes... used to decide when to merge
SimpleLookupTable docsToReferences; // document paths -> HashtableOfObject(category names -> set of words)
SimpleWordSet allWords; // save space by locally interning the referenced words, since an indexer can generate ... | public int NUM_CHANGES = 100; // number of separate document changes... used to decide when to merge
SimpleLookupTable docsToReferences; // document paths -> HashtableOfObject(category names -> set of words)
SimpleWordSet allWords; // save space by locally interning the referenced words, since an indexer can generate ... |
protected void compile(String[] filenames, String[] initialTypeNames) {
int toDo = filenames.length;
if (this.compiledAllAtOnce = toDo <= MAX_AT_ONCE) {
// do them all now
SourceFile[] toCompile = new SourceFile[toDo];
for (int i = 0; i < toDo; i++) {
String filename = filenames[i];
if (JavaBuilder.DEBUG)... | protected void compile(String[] filenames, String[] initialTypeNames) {
int toDo = filenames.length;
if (this.compiledAllAtOnce = toDo <= MAX_AT_ONCE) {
// do them all now
SourceFile[] toCompile = new SourceFile[toDo];
for (int i = 0; i < toDo; i++) {
String filename = filenames[i];
if (JavaBuilder.DEBUG)... |
private Record
cloneRecord() {
try {
return (Record) clone();
}
catch (CloneNotSupportedException e) {
throw new IllegalStateException();
}
}
| public int
hashCode() {
byte [] array = toWireCanonical(true);
int code = 0;
for (int i = 0; i < array.length; i++)
code += ((code << 3) + (array[i] & 0xFF));
return code;
}
Record
cloneRecord() {
try {
return (Record) clone();
}
catch (CloneNotSupportedException e) {
throw new IllegalStateException();
}... |
private void promptUserForFolder() {
SelectFolderDialog dialog = new SelectFolderDialog(getMediator());
if (dialog.success()) {
IMailFolder folder = dialog.getSelectedFolder();
String treePath = folder.getTreePath();
treePathButton.setText(treePath);
}
}
| private void promptUserForFolder() {
SelectFolderDialog dialog = new SelectFolderDialog(getMediator());
if (dialog.success()) {
IMailFolder folder = (IMailFolder) dialog.getSelectedFolder();
String treePath = folder.getTreePath();
treePathButton.setText(treePath);
}
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
Constant cst = this.left.optimizedBooleanConstant();
boolean isLeftOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
boolean isLeftOptimizedFalse = cst != NotAConstant && cst.booleanValue()... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
Constant cst = this.left.optimizedBooleanConstant();
boolean isLeftOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
boolean isLeftOptimizedFalse = cst != NotAConstant && cst.booleanValue()... |
public void
delete(Record record) {
newUpdate(record.withDClass(DClass.NONE));
}
| public void
delete(Record record) {
newUpdate(record.withDClass(DClass.NONE, 0));
}
|
protected void markerFromProblemDetail(IResource resource, IProblemDetail problem) throws CoreException {
IMarker marker = resource.createMarker(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
int start = problem.getStartPos();
int sev = problem.getSeverity();
marker.setAttributes(
new String[]{ IMarker.MESSAGE, I... | protected void markerFromProblemDetail(IResource resource, IProblemDetail problem) throws CoreException {
IMarker marker = resource.createMarker(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
int start = problem.getStartPos();
int sev = problem.getSeverity();
marker.setAttributes(
new String[]{ IMarker.MESSAGE, I... |
int NonStaticTypeFromStaticInvocation = Internal + 522;
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Publi... | int NonStaticTypeFromStaticInvocation = Internal + 522;
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Publi... |
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
BranchLabel falseLabel, endifLabel;
if (this.constant != Constant.NotAConstant) {
// inlined value
if (valueRequired) {
codeStream.generateConstant(this.constant, t... | public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
BranchLabel falseLabel, endifLabel;
if (this.constant != Constant.NotAConstant) {
// inlined value
if (valueRequired) {
codeStream.generateConstant(this.constant, t... |
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
}
);
// ---------
fLogo= new Logo();
//---- overall layout
Panel panel= new Panel(new GridBagLayout());
addGrid(panel, suiteLabel, 0, 0, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
addGrid(panel... | public void actionPerformed(ActionEvent e) {
System.exit(0);
}
}
);
// ---------
fLogo= new Logo();
//---- overall layout
Panel panel= new Panel(new GridBagLayout());
addGrid(panel, suiteLabel, 0, 0, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
addGrid(panel... |
public static boolean checkExists(Group group)
throws DataBackendException, Exception
{
Criteria criteria = new Criteria();
criteria.addSelectColumn(MODULE_ID);
String name = ((Module)group).getRealName();
criteria.add(MODULE_NAME, name);
criteria.add(PARENT_ID, (... | public static boolean checkExists(Group group)
throws DataBackendException, Exception
{
Criteria criteria = new Criteria();
criteria.addSelectColumn(MODULE_ID);
String name = ((Module)group).getRealName();
criteria.add(MODULE_NAME, name);
criteria.add(PARENT_ID, (... |
private int
parseTTL(MyStringTokenizer st) throws IOException {
if (!st.hasMoreTokens())
throw new IOException ("Missing TTL");
return Integer.parseInt(st.nextToken());
}
| private int
parseTTL(MyStringTokenizer st) throws IOException {
if (!st.hasMoreTokens())
throw new IOException ("Missing TTL");
return TTL.parseTTL(st.nextToken());
}
|
public void findMatches(SearchPattern pattern, SearchParticipant[] participants, IJavaSearchScope scope, SearchRequestor requestor, IProgressMonitor monitor) throws CoreException {
if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
/* initialize progress monitor */
if (monitor... | public void findMatches(SearchPattern pattern, SearchParticipant[] participants, IJavaSearchScope scope, SearchRequestor requestor, IProgressMonitor monitor) throws CoreException {
if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
/* initialize progress monitor */
if (monitor... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // here requires to generate a sequence of finally blocks invocations depending corresponding
// to each of the traversed try statements, so that execution will terminate properly.
// lookup the label, this should answ... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // here requires to generate a sequence of finally blocks invocations depending corresponding
// to each of the traversed try statements, so that execution will terminate properly.
// lookup the label, this should answ... |
public static String
formatString(byte [] b, int lineLength, String prefix, boolean addClose) {
String s = toString(b);
StringBuffer sb = new StringBuffer();
for (int i = 0; i < s.length(); i += lineLength) {
sb.append (prefix);
if (i + lineLength >= s.length()) {
sb.append(s.substring(i));
if (addClose)
... | public static String
formatString(byte [] b, int lineLength, String prefix, boolean addClose) {
String s = toString(b);
StringBuffer sb = new StringBuffer();
for (int i = 0; i < s.length(); i += lineLength) {
sb.append (prefix);
if (i + lineLength >= s.length()) {
sb.append(s.substring(i));
if (addClose)
... |
public String addImport(ITypeBinding binding, ImportRewriteContext context) {
if (binding.isPrimitive() || binding.isTypeVariable()) {
return binding.getName();
}
| public String addImport(ITypeBinding binding, ImportRewriteContext context) {
if (binding.isPrimitive() || binding.isTypeVariable() || binding.isRecovered()) {
return binding.getName();
}
|
public PropPanelClass() {
super("Class", ConfigLoader.getTabPropsOrientation());
Class mclass = MClass.class;
addField(Argo.localize("UMLMenu", "label.name"), getNameTextField());
addField(Argo.localize("UMLMenu", "label.stereotype"), new UMLComboBoxNavigator(this, Argo.localize("UMLMenu", "tooltip.... | public PropPanelClass() {
super("Class", ConfigLoader.getTabPropsOrientation());
Class mclass = MClass.class;
addField(Argo.localize("UMLMenu", "label.name"), getNameTextField());
addField(Argo.localize("UMLMenu", "label.stereotype"), new UMLComboBoxNavigator(this, Argo.localize("UMLMenu", "tooltip.... |
public void actionPerformed(ActionEvent evt) {
EditFolderDialog dialog = new EditFolderDialog("New Folder");
dialog.showDialog();
String name;
if (dialog.success() == true) {
// ok pressed
name = dialog.getName();
} else {
// cancel pressed
return;
}
FolderCommandReference[] r =
(Folder... | public void actionPerformed(ActionEvent evt) {
EditFolderDialog dialog = new EditFolderDialog("New Folder");
dialog.showDialog();
String name;
if (dialog.success()) {
// ok pressed
name = dialog.getName();
} else {
// cancel pressed
return;
}
FolderCommandReference[] r =
(FolderCommandR... |
protected IType lookupType(ReferenceBinding typeBinding) {
if (typeBinding == null) return null;
char[] packageName = typeBinding.qualifiedPackageName();
IPackageFragment[] pkgs = this.nameLookup.findPackageFragments(
(packageName == null || packageName.length == 0)
? IPackageFragment.DEFAULT_PACKAGE_NAME
:... | protected IType lookupType(ReferenceBinding typeBinding) {
if (typeBinding == null) return null;
char[] packageName = typeBinding.qualifiedPackageName();
IPackageFragment[] pkgs = this.nameLookup.findPackageFragments(
(packageName == null || packageName.length == 0)
? IPackageFragment.DEFAULT_PACKAGE_NAME
:... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
NullLiteral(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
*/
NullLiteral(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(... |
public static Record []
getRecords(String namestr, short type, short dclass, byte cred) {
Record [] answers = null;
Name name;
try {
name = Name.fromString(namestr, null);
} catch (TextParseException e) {
return null;
}
if (!Type.isRR(type) && type != Type.ANY)
return null;
if (name.isQualified())
ans... | public static Record []
getRecords(String namestr, short type, short dclass, byte cred) {
Record [] answers = null;
Name name;
try {
name = Name.fromString(namestr, null);
} catch (TextParseException e) {
return null;
}
if (!Type.isRR(type) && type != Type.ANY)
return null;
if (name.isAbsolute())
answ... |
protected void verify(IJavaElement element) throws JavaModelException {
IJavaElement[] children = ((IRegion) fChildrenToRemove.get(element)).getElements();
for (int i = 0; i < children.length; i++) {
IJavaElement child = children[i];
if (child.getCorrespondingResource() != null)
error(IJavaModelStatusCon... | protected void verify(IJavaElement element) throws JavaModelException {
IJavaElement[] children = ((IRegion) fChildrenToRemove.get(element)).getElements();
for (int i = 0; i < children.length; i++) {
IJavaElement child = children[i];
if (child.getResource() != null)
error(IJavaModelStatusConstants.INVALI... |
public final void computeConstant(TypeBinding leftType, TypeBinding rightType) {
if ((this.left.constant != Constant.NotAConstant) && (this.right.constant != Constant.NotAConstant)) {
this.constant =
Constant.computeConstantOperationEQUAL_EQUAL(
left.constant,
leftType.id,
right.constant,
... | public final void computeConstant(TypeBinding leftType, TypeBinding rightType) {
if ((this.left.constant != Constant.NotAConstant) && (this.right.constant != Constant.NotAConstant)) {
this.constant =
Constant.computeConstantOperationEQUAL_EQUAL(
left.constant,
leftType.id,
right.constant,
... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
BodyDeclaration(AST ast) {
super(ast);
if (ast.apiLevel >= AST.LEVEL_3_0) {
this.modifiers = new ASTNode.NodeList(internalModifiers2Property());
}
}
| * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
BodyDeclaration(AST ast) {
super(ast);
if (ast.apiLevel >= AST.JLS3) {
this.modifiers = new ASTNode.NodeList(internalModifiers2Property());
}
}
|
private boolean hasSuiteMethod() {
// TODO: check all attributes
try {
fTestClass.getMethod("suite");
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
return false;
}
return true;
}
boolean isPre4Test(Class<?> testCla... | public boolean hasSuiteMethod() {
// TODO: check all attributes
try {
fTestClass.getMethod("suite");
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
return false;
}
return true;
}
boolean isPre4Test(Class<?> testClas... |
private static final int[] EMPTY_LINE_ENDS = new int[0];
//----------------optimized identifier managment------------------
static final char[] charArray_a = new char[] {'a'},
charArray_b = new char[] {'b'},
charArray_c = new char[] {'c'},
charArray_d = new char[] {'d'},
charArray_e = new char[] {'e'}, ... | private static final int[] EMPTY_LINE_ENDS = new int[0];
//----------------optimized identifier managment------------------
static final char[] charArray_a = new char[] {'a'},
charArray_b = new char[] {'b'},
charArray_c = new char[] {'c'},
charArray_d = new char[] {'d'},
charArray_e = new char[] {'e'}, ... |
protected Control createContents(Composite parent) {
WorkbenchHelp.setHelp(parent, IHelpContextIds.PROJECT_CAPABILITY_PROPERTY_PAGE);
noDefaultAndApplyButton();
CapabilityRegistry reg = WorkbenchPlugin.getDefault().getCapabilityRegistry();
String instructions;
if (reg.hasCapabilities())
instructions = ... | protected Control createContents(Composite parent) {
WorkbenchHelp.setHelp(getControl(), IHelpContextIds.PROJECT_CAPABILITY_PROPERTY_PAGE);
noDefaultAndApplyButton();
CapabilityRegistry reg = WorkbenchPlugin.getDefault().getCapabilityRegistry();
String instructions;
if (reg.hasCapabilities())
instructi... |
public synchronized void relax() {
if (nodes == null)
return;
Enumeration edgeEnum = edges.keys();
while (edgeEnum.hasMoreElements()) {
ConnectionFigure e = (ConnectionFigure)edgeEnum.nextElement();
double targetlen = len(e);
GraphNode from = getGraphNode(e.getStartConnector().owner());... | public synchronized void relax() {
if (nodes == null)
return;
Enumeration edgeEnum = edges.keys();
while (edgeEnum.hasMoreElements()) {
ConnectionFigure e = (ConnectionFigure)edgeEnum.nextElement();
double targetlen = len(e);
GraphNode from = getGraphNode(e.getStartConnector().owner());... |
private boolean isValidContainer() {
if (container.getType() != IResource.PROJECT)
return false;
IWorkspace workspace = WorkbenchPlugin.getPluginWorkspace();
IFolder linkHandle = createFolderHandle("a");
IStatus status = workspace.validateLinkLocation(linkHandle, Path.EMPTY);
if (status.getCode() == IResour... | private boolean isValidContainer() {
if (container.getType() != IResource.PROJECT)
return false;
IWorkspace workspace = WorkbenchPlugin.getPluginWorkspace();
IFolder linkHandle = createFolderHandle("a"); //$NON-NLS-1$
IStatus status = workspace.validateLinkLocation(linkHandle, Path.EMPTY);
if (status.getCod... |
public void readPopupContributors(ObjectActionContributorManager mng) {
setManager(mng);
IPluginRegistry registry = Platform.getPluginRegistry();
readRegistry(registry, PlatformUI.PLUGIN_ID, IWorkbenchConstants.PL_POPUP_MENU);
}
| public void readPopupContributors(ObjectActionContributorManager mng) {
setManager(mng);
IExtensionRegistry registry = Platform.getExtensionRegistry();
readRegistry(registry, PlatformUI.PLUGIN_ID, IWorkbenchConstants.PL_POPUP_MENU);
}
|
protected void enterTypeParameter(TypeParameterInfo typeParameterInfo) {
JavaElementInfo parentInfo = (JavaElementInfo) this.infoStack.peek();
JavaElement parentHandle = (JavaElement) this.handleStack.peek();
String nameString = new String(typeParameterInfo.name);
TypeParameter handle = handle = new TypeParameter(p... | protected void enterTypeParameter(TypeParameterInfo typeParameterInfo) {
JavaElementInfo parentInfo = (JavaElementInfo) this.infoStack.peek();
JavaElement parentHandle = (JavaElement) this.handleStack.peek();
String nameString = new String(typeParameterInfo.name);
TypeParameter handle = handle = new TypeParameter(p... |
private static final String[] CAPABILITY_LIST = {
"Body", "Subject", "From", "To", "Cc", "Bcc", "Custom Headerfield",
"Date", "Flags", "Priority"
};
| private static final String[] CAPABILITY_LIST = {
"Body", "Subject", "From", "To", "Cc", "Bcc", "Custom Headerfield",
"Date", "Priority"
};
|
public boolean isCloseable(IPresentablePart part) {
return true;
}
| public boolean isCloseable(IPresentablePart part) {
return part.isCloseable();
}
|
private IJavaElement createElement(Scope scope, int elementPosition, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) {
IJavaElement newElement = (IJavaElement)knownScopes.get(scope);
if (newElement != null) return newElement;
switch(scope.kind) {
case Scope.COMPILATION_UNIT_SCOPE :
... | private IJavaElement createElement(Scope scope, int elementPosition, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) {
IJavaElement newElement = (IJavaElement)knownScopes.get(scope);
if (newElement != null) return newElement;
switch(scope.kind) {
case Scope.COMPILATION_UNIT_SCOPE :
... |
private static String[] allModelElements = {
"AssociationEndRole",
"AssociationRole",
"ClassifierRole",
"Collaboration",
"Interaction",
"Message",
};
| public void testDeleteComplete() {
CheckUMLModelHelper.deleteComplete(this,
CollaborationsFactory.getFactory(),
allModelElements);
}
}
|
public void
addRR(Record record) {
Hashtable nametable = (Hashtable) data.get(record.getName());
if (nametable == null) {
nametable = new Hashtable();
data.put(record.name, nametable);
/*System.out.println("Adding name <" + record.name + "> to [" + origin + "]");*/
}
RRset rrset = (RRset) nametable.get(new Shor... | public void
addRR(Record record) {
Hashtable nametable = (Hashtable) data.get(record.getName());
if (nametable == null) {
nametable = new Hashtable();
data.put(record.name, nametable);
/*System.out.println("Adding name <" + record.name + "> to [" + origin + "]");*/
}
RRset rrset = (RRset) nametable.get(new Shor... |
public IJavaModelStatus getJavaModelStatus() {
IStatus status = this.getStatus();
if (status instanceof IJavaModelStatus) {
return (IJavaModelStatus)status;
} else {
// A regular IStatus is created only in the case of a CoreException.
// See bug 13492 Should handle JavaModelExceptions that contains CoreExcepti... | public IJavaModelStatus getJavaModelStatus() {
IStatus status = getStatus();
if (status instanceof IJavaModelStatus) {
return (IJavaModelStatus)status;
} else {
// A regular IStatus is created only in the case of a CoreException.
// See bug 13492 Should handle JavaModelExceptions that contains CoreException mo... |
public Boolean getBoolean(String key) {
Attr attr = element.getAttributeNode(key);
if (attr == null) {
return Boolean.FALSE;
}
return Boolean.valueOf(attr.getValue());
}
| public Boolean getBoolean(String key) {
Attr attr = element.getAttributeNode(key);
if (attr == null) {
return null;
}
return Boolean.valueOf(attr.getValue());
}
|
public int getNodeType() {
return INFIX_EXPRESSION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
InfixExpression result = new InfixExpression(target);
| public int getNodeType() {
return INFIX_EXPRESSION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
InfixExpression result = new InfixExpression(target);
|
public void selectAll()
{
CheckBoxListModel model = (CheckBoxListModel)getModel();
for(int i = 0; i < model.items.size(); i++)
{
Entry entry = (Entry)model.items.elementAt(i);
entry.checked = true;
}
model.fireTableStructureChanged();
}
| public void selectAll()
{
CheckBoxListModel model = (CheckBoxListModel)getModel();
for(int i = 0; i < model.items.size(); i++)
{
Entry entry = (Entry)model.items.elementAt(i);
entry.checked = true;
}
model.fireTableRowsUpdated(0,model.getRowCount());
}
|
public byte
verify(Message m, byte [] b, int length, TSIGRecord old) {
TSIGRecord tsig = m.getTSIG();
hmacSigner h = new hmacSigner(key);
if (tsig == null)
return Rcode.FORMERR;
if (!tsig.getName().equals(name) || !tsig.getAlgorithm().equals(alg)) {
if (Options.check("verbose"))
System.err.println("BADKEY f... | public byte
verify(Message m, byte [] b, int length, TSIGRecord old) {
TSIGRecord tsig = m.getTSIG();
hmacSigner h = new hmacSigner(key);
if (tsig == null)
return Rcode.FORMERR;
if (!tsig.getName().equals(name) || !tsig.getAlgorithm().equals(alg)) {
if (Options.check("verbose"))
System.err.println("BADKEY f... |
public final void handleEvent(final Event event) {
if (!(event.widget instanceof Shell)) {
if (DEBUG) {
logDebuggingInfo("ASSP: passOnEvent: " + event.widget); //$NON-NLS-1$
}
return;
}
if (DEBUG) {
logDebuggingInfo("\tASSP:lastActiveShell: " + lastActiveShell); //$NON-NLS-1$
logDeb... | public final void handleEvent(final Event event) {
if (!(event.widget instanceof Shell)) {
if (DEBUG) {
logDebuggingInfo("ASSP: passOnEvent: " + event.widget); //$NON-NLS-1$
}
return;
}
if (DEBUG) {
logDebuggingInfo("\tASSP:lastActiveShell: " + lastActiveShell); //$NON-NLS-1$
logDeb... |
public final void commandChanged(
final CommandEvent commandEvent) {
if (command.isDefined()) {
command.removeCommandListener(this);
loggedCommandIds.remove(commandId);
... | public final void commandChanged(
final CommandEvent commandEvent) {
if (command.isDefined()) {
command.removeCommandListener(this);
loggedCommandIds.remove(commandId);
... |
protected void initTab(TabItem tabItem, IPresentablePart part) {
tabItem.setText(part.getName());
tabItem.setToolTipText(part.getTitleToolTip());
Image tabImage = part.getTitleImage();
if (tabImage != tabItem.getImage()) {
tabItem.setImage(tabImage);
}
}
| protected void initTab(TabItem tabItem, IPresentablePart part) {
tabItem.setText(part.getName());
tabItem.setToolTipText(part.getTitleToolTipText());
Image tabImage = part.getTitleImage();
if (tabImage != tabItem.getImage()) {
tabItem.setImage(tabImage);
}
}
|
public void run() {
IStatus result = null;
try {
//As we are in the UI Thread we can
//always know what to tell the job.
setThread(Thread.currentThread());
if (monitor.isCanceled())
... | public void run() {
IStatus result = null;
try {
//As we are in the UI Thread we can
//always know what to tell the job.
setThread(Thread.currentThread());
if (monitor.isCanceled())
... |
private boolean verifyWorkingSet(IWorkingSet workingSetCandidate) {
return !workingSetCandidate.isAggregateWorkingSet()
&& Arrays.binarySearch(workingSetTypeIds, workingSetCandidate
.getId()) != -1;
}
| private boolean verifyWorkingSet(IWorkingSet workingSetCandidate) {
return !workingSetCandidate.isAggregateWorkingSet()
&& Arrays.binarySearch(workingSetTypeIds, workingSetCandidate
.getId()) >= 0 ;
}
|
public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream) {
if (binding.isVarargs()) {
// 5 possibilities exist for a call to the vararg method foo(int i, int ... value) :
// foo(1), foo(1, null), foo(1, 2), foo(1, 2, 3, 4) & foo(1, ne... | public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream) {
if (binding.isVarargs()) {
// 5 possibilities exist for a call to the vararg method foo(int i, int ... value) :
// foo(1), foo(1, null), foo(1, 2), foo(1, 2, 3, 4) & foo(1, ne... |
public Vector rowObjectsFor(Object t) {
if (!(t instanceof UMLClassDiagram)) return new Vector();
UMLClassDiagram d = (UMLClassDiagram) t;
Vector nodes = d.getGraphModel().getNodes();
Vector res = new Vector();
int size = nodes.size();
for (int i = 0; i < size; i++) {
Object node = nodes... | public Vector rowObjectsFor(Object t) {
if (!(t instanceof UMLClassDiagram)) return new Vector();
UMLClassDiagram d = (UMLClassDiagram) t;
Vector nodes = d.getNodes();
Vector res = new Vector();
int size = nodes.size();
for (int i = 0; i < size; i++) {
Object node = nodes.elementAt(i);
... |
public void log(String msg) {
context.logServlet( msg );
}
| public void log(String msg) {
context.logServlet( msg, null );
}
|
public void navigateUp() {
ProjectBrowser.TheInstance.setTarget(((MInteraction)getTarget()).getContext());
}
| public void navigateUp() {
ProjectBrowser.getInstance().setTarget(((MInteraction)getTarget()).getContext());
}
|
public int literalIndex(char[] utf8Constant) {
int index;
if ((index = UTF8Cache.get(utf8Constant)) < 0) {
// The entry doesn't exit yet
// Write the tag first
writeU1(Utf8Tag);
// Then the size of the stringName array
int savedCurrentOffset = currentOffset;
if (currentOffset + 2 >= poolContent.length) {
... | public int literalIndex(char[] utf8Constant) {
int index;
if ((index = UTF8Cache.get(utf8Constant)) < 0) {
// The entry doesn't exit yet
// Write the tag first
writeU1(Utf8Tag);
// Then the size of the stringName array
int savedCurrentOffset = currentOffset;
if (currentOffset + 2 >= poolContent.length) {
... |
private void createPreviewControl(Composite parent) {
Label label = new Label(parent, SWT.LEFT);
label.setText(WorkbenchMessages.getString("FontsPreference.preview")); //$NON-NLS-1$
label.setFont(parent.getFont());
previewer = new DefaultPreviewer(parent);
Control control = previewer.getControl();
GridDat... | private void createPreviewControl(Composite parent) {
Label label = new Label(parent, SWT.LEFT);
label.setText(WorkbenchMessages.getString("FontsPreference.preview")); //$NON-NLS-1$
label.setFont(parent.getFont());
previewer = new DefaultPreviewer(parent);
Control control = previewer.getControl();
GridDat... |
public void initializeRoots() {
// remember roots infos as old roots infos
this.oldRoots = this.roots == null ? new HashMap() : this.roots;
this.oldOtherRoots = this.otherRoots == null ? new HashMap() : this.otherRoots;
// recompute root infos only if necessary
if (!rootsAreStale) return;
this.roots = ... | public void initializeRoots() {
// remember roots infos as old roots infos
this.oldRoots = this.roots == null ? new HashMap() : this.roots;
this.oldOtherRoots = this.otherRoots == null ? new HashMap() : this.otherRoots;
// recompute root infos only if necessary
if (!rootsAreStale) return;
this.roots = ... |
public DefaultBytecodeVisitor(StringBuffer buffer, String lineSeparator, int tabNumber) {
this.buffer = buffer;
this.lineSeparator = lineSeparator;
this.tabNumber = tabNumber;
}
| public DefaultBytecodeVisitor(StringBuffer buffer, String lineSeparator, int tabNumber) {
this.buffer = buffer;
this.lineSeparator = lineSeparator;
this.tabNumber = tabNumber + 1;
}
|
protected ISchedulingRule getSchedulingRule() {
// returns the folder corresponding to the package of the cu to commit
return getElementToProcess().getParent().getResource();
}
| protected ISchedulingRule getSchedulingRule() {
// returns the folder corresponding to the package of the cu to commit
return getElementToProcess().getParent().getSchedulingRule();
}
|
public
SOARecord(Name name, int dclass, long ttl, Name host, Name admin,
long serial, long refresh, long retry, long expire, long minimum)
{
this(name, dclass, ttl);
if (!host.isAbsolute())
throw new RelativeNameException(host);
this.host = host;
if (!admin.isAbsolute())
throw new RelativeNameException(admin... | public
SOARecord(Name name, int dclass, long ttl, Name host, Name admin,
long serial, long refresh, long retry, long expire, long minimum)
{
this(name, dclass, ttl);
if (!host.isAbsolute())
throw new RelativeNameException(host);
this.host = host;
if (!admin.isAbsolute())
throw new RelativeNameException(admin... |
public void remove(Object[] elements) {
for (int i = 0; i < elements.length; i++) {
// Make sure we are not keeping this one
if (((JobTreeElement) elements[i]).isJobInfo()
&& FinishedJobs.getInstance().isFinished(
(JobInfo) elements[i])) {
Widget item = doFindItem(elements[i]);
if (item !... | public void remove(Object[] elements) {
for (int i = 0; i < elements.length; i++) {
// Make sure we are not keeping this one
if (((JobTreeElement) elements[i]).isJobInfo()
&& FinishedJobs.getInstance().isKept(
(JobInfo) elements[i])) {
Widget item = doFindItem(elements[i]);
if (item != nu... |
public static final int convertToSWT(final KeyStroke keyStroke) {
if (keyStroke == null)
throw new NullPointerException();
int key = 0;
final Iterator iterator = keyStroke.getModifierKeys().iterator();
while (iterator.hasNext()) {
final ModifierKey modif... | public static final int convertToSWT(final KeyStroke keyStroke) {
if (keyStroke == null)
throw new NullPointerException();
int key = 0;
final Iterator iterator = keyStroke.getModifierKeys().iterator();
while (iterator.hasNext()) {
final ModifierKey modif... |
public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) {
IConfigurationElement[] items = additionElement.getChildren();
for (int i = 0; i < items.length; i++) {
String itemType = items[i].getName();
IContributionItem newItem = null;
if (IWorkbenchRegistryConstant... | public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) {
IConfigurationElement[] items = additionElement.getChildren();
for (int i = 0; i < items.length; i++) {
String itemType = items[i].getName();
IContributionItem newItem = null;
if (IWorkbenchRegistryConstant... |
private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
// handle the error here
this.constant = Constant.NotAConstant;
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !t... | private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
// handle the error here
this.constant = Constant.NotAConstant;
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !t... |
public void codeComplete(char[] snippet,int insertion,int position,char[][] localVariableTypeNames,char[][] localVariableNames,int[] localVariableModifiers,boolean isStatic,ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nu... | public void codeComplete(char[] snippet,int insertion,int position,char[][] localVariableTypeNames,char[][] localVariableNames,int[] localVariableModifiers,boolean isStatic,ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nu... |
public char[] getCharContent() throws IOException {
if (charContents != null) return charContents;
IPath location = file.getLocation();
if (location == null) return new char[0];
return charContents = org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(location.toFile());
}
| public char[] getCharContent() throws IOException {
if (charContents != null) return charContents;
IPath location = file.getLocation();
if (location == null) return new char[0];
return charContents = org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(location.toFile(), null);
}
|
public Name
getTextDomain() {
return textDomain;
}
void
rrToWire(DataByteOutputStream out, Compression c, boolean canonical) {
if (mailbox == null || textDomain == null)
return;
mailbox.toWire(out, null, canonical);
textDomain.toWire(out, null, canonical);
}
| public Name
getTextDomain() {
return textDomain;
}
void
rrToWire(DNSOutput out, Compression c, boolean canonical) {
if (mailbox == null || textDomain == null)
return;
mailbox.toWire(out, null, canonical);
textDomain.toWire(out, null, canonical);
}
|
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new AddAddressToWhiteListCommand(r));
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new AddAddressToWhiteListCommand(r));
}
|
public Expression getExpression() {
if (!expressionInitialized) {
// lazy initialize - use setter to ensure parent link set too
setExpression(new SimpleName(getAST()));
}
return optionalExpression;
}
| public Expression getExpression() {
if (!expressionInitialized) {
// lazy initialize - use setter to ensure parent link set too
setExpression(null);
}
return optionalExpression;
}
|
int MAJOR_VERSION_1_5 = 49;
/*******************************************************************************
* 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 acco... | int MAJOR_VERSION_1_5 = 49;
/*******************************************************************************
* 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 acco... |
public
AAAARecord(Name name, short dclass, int ttl, Inet6Address address) {
this(name, dclass, ttl);
this.address = address;
}
Record
rrFromWire(Name name, short type, short dclass, int ttl, int length,
DataByteInputStream in)
throws IOException
{
AAAARecord rec = new AAAARecord(name, dclass, ttl);
if (in == ... | public
AAAARecord(Name name, short dclass, int ttl, Inet6Address address) {
this(name, dclass, ttl);
this.address = address;
}
Record
rrFromWire(Name name, short type, short dclass, int ttl, int length,
DataByteInputStream in)
throws IOException
{
AAAARecord rec = new AAAARecord(name, dclass, ttl);
if (in == ... |
package org.jhotdraw.contrib.html;
/*
* @(#)ContentProducerContext.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;
/*
* @(#)ContentProducerContext.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 void execute(Worker worker) throws Exception {
/*
* *20030604, karlpeder* Fixed minor flaws to be able to print
* text messages. Further more added support for html messages.
*/
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Object[] uids = r[0].getUids(); // uid for ... | public void execute(Worker worker) throws Exception {
/*
* *20030604, karlpeder* Fixed minor flaws to be able to print
* text messages. Further more added support for html messages.
*/
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Object[] uids = r[0].getUids(); // uid for ... |
public TabTaggedValues() {
super("TaggedValues");
_tableModel = new TableModelTaggedValues(this);
_table.setModel(_tableModel);
// TableColumn keyCol = _table.getColumnModel().getColumn(0);
// TableColumn valCol = _table.getColumnModel().getColumn(1);
// keyCol.setMinWidth(50);
... | public TabTaggedValues() {
super("tab.tagged-values");
_tableModel = new TableModelTaggedValues(this);
_table.setModel(_tableModel);
// TableColumn keyCol = _table.getColumnModel().getColumn(0);
// TableColumn valCol = _table.getColumnModel().getColumn(1);
// keyCol.setMinWidth(50)... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
ExpressionStatement(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDesc... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
ExpressionStatement(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDesc... |
public static PatternLocator patternLocator(SearchPattern pattern) {
switch (pattern.kind) {
case IIndexConstants.PKG_REF_PATTERN :
return new PackageReferenceLocator((PackageReferencePattern) pattern);
case IIndexConstants.PKG_DECL_PATTERN :
return new PackageDeclarationLocator((PackageDeclarationPattern) p... | public static PatternLocator patternLocator(SearchPattern pattern) {
switch (((InternalSearchPattern)pattern).kind) {
case IIndexConstants.PKG_REF_PATTERN :
return new PackageReferenceLocator((PackageReferencePattern) pattern);
case IIndexConstants.PKG_DECL_PATTERN :
return new PackageDeclarationLocator((Pac... |
public void fillActionBars(int flags) {
Workbench workbench = getWorkbenchImpl();
workbench.largeUpdateStart();
try {
getActionBarAdvisor().fillActionBars(flags);
//
// 3.3 start
final IMenuService menuService = (IMenuService) serviceLocator
.getService(IMenuService.class);
menuService.popula... | public void fillActionBars(int flags) {
Workbench workbench = getWorkbenchImpl();
workbench.largeUpdateStart();
try {
getActionBarAdvisor().fillActionBars(flags);
//
// 3.3 start
final IMenuService menuService = (IMenuService) serviceLocator
.getService(IMenuService.class);
menuService.popula... |
public void setOptionId(NumberKey optionId)
throws Exception
{
if ( optionId != null && optionId.getValue() != null )
{
List options = getIssue().getScarabModule()
.getRModuleOptions(getAttribute());
for ( int i=options.size()-1; i>=0; i-- )
... | public void setOptionId(NumberKey optionId)
throws Exception
{
if ( optionId != null && optionId.getValue() != null )
{
List options = getIssue().getScarabModule()
.getRModuleOptions(getAttribute());
for ( int i=options.size()-1; i>=0; i-- )
... |
public void analyseCode(
ClassScope classScope,
InitializationFlowContext staticInitializerFlowContext,
FlowInfo flowInfo) {
if (ignoreFurtherInvestigation)
return;
try {
ExceptionHandlingFlowContext clinitContext =
new ExceptionHandlingFlowContext(
staticInitializerFlowContext.parent,
t... | public void analyseCode(
ClassScope classScope,
InitializationFlowContext staticInitializerFlowContext,
FlowInfo flowInfo) {
if (ignoreFurtherInvestigation)
return;
try {
ExceptionHandlingFlowContext clinitContext =
new ExceptionHandlingFlowContext(
staticInitializerFlowContext.parent,
t... |
public void setExtensionPoint(Vector x) throws PropertyVetoException {
if (_extensionPoint == null) _extensionPoint = new Vector();
fireVetoableChange("extensionPoint", _extensionPoint, x);
_extensionPoint = x;
}
| public void setExtensionPoint(Vector x) throws PropertyVetoException {
if (_extensionPoint == null) _extensionPoint = new Vector();
fireVetoableChangeNoCompare("extensionPoint", _extensionPoint, x);
_extensionPoint = x;
}
|
public MarkMessageAsHamAction(FrameMediator frameController) {
super(frameController, "Mark Message as Ham");
// tooltip text
setTooltipText("Mark selected messages as Ham");
setEnabled(false);
(
(
AbstractMailFrameController) frameController)
.registerTableSelectionListener(
this);
}
| public MarkMessageAsHamAction(FrameMediator frameController) {
super(frameController, "Mark Message as Ham");
// tooltip text
putValue(SHORT_DESCRIPTION, "Mark selected messages as Ham");
setEnabled(false);
(
(
AbstractMailFrameController) frameController)
.registerTableSelectionListener(
th... |
public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
// tolerate some error cases
if (binding == null ||
!(binding.isValidBinding() ||
binding.problemId() == ProblemReasons.NotVisible
|| binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName
|| binding... | public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
// tolerate some error cases
if (binding == null ||
!(binding.isValidBinding() ||
binding.problemId() == ProblemReasons.NotVisible
|| binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName
|| binding... |
private int matchLevel(NameReference nameRef, boolean resolve) {
if (!resolve) {
if (this.simpleName == null) {
return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;
} else {
if (nameRef instanceof SingleNameReference) {
if (this.matchesName(this.simpleName, ((SingleNameReference)nameRef).token)) {... | private int matchLevel(NameReference nameRef, boolean resolve) {
if (!resolve) {
if (this.simpleName == null) {
return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;
} else {
if (nameRef instanceof SingleNameReference) {
if (this.matchesName(this.simpleName, ((SingleNameReference)nameRef).token)) {... |
public String getName() {
return "Body_Contains";
}
| public String getName() {
return "body_contains";
}
|
protected void initTab(CTabItem tabItem, IPresentablePart part) {
tabItem.setText(part.getName());
tabItem.setImage(part.getTitleImage());
String toolTipText = part.getTitleToolTip();
if (!toolTipText.equals(Util.ZERO_LENGTH_STRING)) {
tabItem.setToolTipText(toolTipText);
}
... | protected void initTab(CTabItem tabItem, IPresentablePart part) {
tabItem.setText(part.getName());
tabItem.setImage(part.getTitleImage());
String toolTipText = part.getTitleToolTip();
if (!toolTipText.equals(Util.ZERO_LENGTH_STRING)) {
tabItem.setToolTipText(toolTipText);
}
... |
private void setHelpTrace(String contextId) {
// Create an unthrown exception to capture the stack trace
IllegalArgumentException e = new IllegalArgumentException();
StackTraceElement[] stackTrace = e.getStackTrace();
StackTraceElement currentElement = null;
for (int s = 0; s < stackTrace.length; s++) {
i... | private void setHelpTrace(String contextId) {
// Create an unthrown exception to capture the stack trace
RuntimeException e = new RuntimeException();
StackTraceElement[] stackTrace = e.getStackTrace();
StackTraceElement currentElement = null;
for (int s = 0; s < stackTrace.length; s++) {
if (stackTrace[s]... |
public void updateDefinedContextIds() {
if (registryReader == null)
registryReader = new RegistryReader(Platform.getPluginRegistry());
registryReader.load();
SortedMap contextElementsById = ContextElement.sortedMapById(registryReader.getContextElements());
SortedSet contextElementAdditions = new TreeSe... | public void updateDefinedContextIds() {
if (registryReader == null)
registryReader = new RegistryReader(Platform.getPluginRegistry());
registryReader.load();
SortedMap contextElementsById = ContextElement.sortedMapById(registryReader.getContextElements());
SortedSet contextElementAdditions = new TreeSe... |
public void removeUnusedPcToSourceMapEntries() {
if (this.pcToSourceMapSize != 0) {
while (pcToSourceMap[pcToSourceMapSize - 2] > this.position) {
this.pcToSourceMapSize -= 2;
}
}
| public void removeUnusedPcToSourceMapEntries() {
if (this.pcToSourceMapSize != 0) {
while (this.pcToSourceMapSize >= 2 && this.pcToSourceMap[this.pcToSourceMapSize - 2] > this.position) {
this.pcToSourceMapSize -= 2;
}
}
|
public void exitAnyExceptionHandler() {
if (this.anyExceptionLabelsCount == 0) return;
ExceptionLabel currentLabel = this.anyExceptionLabels[this.anyExceptionLabelsCount-1];
if (currentLabel.start == currentLabel.codeStream.position) {
// discard empty exception handler
this.anyExceptionLabels[this.anyExce... | public void exitAnyExceptionHandler() {
if (this.anyExceptionLabelsCount == 0) return;
ExceptionLabel currentLabel = this.anyExceptionLabels[this.anyExceptionLabelsCount-1];
if (currentLabel.start == currentLabel.codeStream.position) {
// discard empty exception handler
this.anyExceptionLabels[--this.anyEx... |
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... |
public void copyQuery( ScarabUser user )
throws Exception
{
Query newQuery = new Query();
newQuery.setName(getName() + " (copy)");
newQuery.setDescription(getDescription());
newQuery.setValue(getValue());
newQuery.setModuleId(getModuleId());
... | public void copyQuery( ScarabUser user )
throws Exception
{
Query newQuery = new Query();
newQuery.setName(getName() + " (copy)");
newQuery.setDescription(getDescription());
newQuery.setValue(getValue());
newQuery.setModuleId(getModuleId());
... |
public
WireParseException(String s) {
super(s);
};
| public
WireParseException(String s) {
super(s);
}
|
public final static String NA = "?";
static final long serialVersionUID = -1325822038990805636L;
// Check if we are running in IBM's visual age.
static boolean inVisualAge = false;
{
try {
Class dummy = Class.forName("com.ibm.uvm.tools.DebugSupport");
inVisualAge = true;
LogLog.debug(... | public final static String NA = "?";
static final long serialVersionUID = -1325822038990805636L;
// Check if we are running in IBM's visual age.
static boolean inVisualAge = false;
static {
try {
Class dummy = Class.forName("com.ibm.uvm.tools.DebugSupport");
inVisualAge = true;
LogLog... |
public boolean inContext(Object[] o) {
if (o.length < 2) return false;
// Allow ourselves on the "Tools" menu.
if ((o[0] instanceof JMenuItem) &&
("Tools".equals(o[1]))) {
return true;
}
return false;
}
| public boolean inContext(Object[] o) {
if (o.length < 2) return false;
// Allow ourselves on the "Tools" menu.
if ((o[0] instanceof JMenuItem) &&
(PluggableMenu.KEY_TOOLS.equals(o[1]))) {
return true;
}
return false;
}
|
private FieldBinding resolveTypeFor(FieldBinding field) {
if ((field.modifiers & AccUnresolved) == 0)
return field;
if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
if ((field.getAnnotationTagBits() & AnnotationDeprecated) != 0)
field.modifiers |= AccDeprecated;
else if ((field.m... | private FieldBinding resolveTypeFor(FieldBinding field) {
if ((field.modifiers & AccUnresolved) == 0)
return field;
if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
if ((field.getAnnotationTagBits() & AnnotationDeprecated) != 0)
field.modifiers |= AccDeprecated;
else if ((field.m... |
public CodeSnippetClassFile(
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding aType,
org.eclipse.jdt.internal.compiler.ClassFile enclosingClassFile,
boolean creatingProblemType) {
/**
* INTERNAL USE-ONLY
* This methods creates a new instance of the receiver.
*
* @param aType org.eclipse.jdt.intern... | public CodeSnippetClassFile(
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding aType,
org.eclipse.jdt.internal.compiler.ClassFile enclosingClassFile,
boolean creatingProblemType) {
/**
* INTERNAL USE-ONLY
* This methods creates a new instance of the receiver.
*
* @param aType org.eclipse.jdt.intern... |
public static KEYRecord
buildRecord(Name name, short dclass, int ttl, int flags, int proto,
PublicKey key)
| public static KEYRecord
buildRecord(Name name, int dclass, int ttl, int flags, int proto,
PublicKey key)
|
public static IJavaModelStatus validateClasspathEntry(IJavaProject javaProject, IClasspathEntry entry, boolean checkSourceAttachment){
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IPath path = entry.getPath();
switch(entry.getEntryKind()){
// container entry check
case I... | public static IJavaModelStatus validateClasspathEntry(IJavaProject javaProject, IClasspathEntry entry, boolean checkSourceAttachment){
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IPath path = entry.getPath();
switch(entry.getEntryKind()){
// container entry check
case I... |
public void execute(Worker worker) throws Exception {
ComposerCommandReference[] r =
(ComposerCommandReference[]) getReferences();
ComposerController composerController = r[0].getComposerController();
AccountItem item =
((ComposerModel) composerController.getModel()).getAccountItem();
SendableMessage... | public void execute(Worker worker) throws Exception {
ComposerCommandReference[] r =
(ComposerCommandReference[]) getReferences();
ComposerController composerController = r[0].getComposerController();
AccountItem item =
((ComposerModel) composerController.getModel()).getAccountItem();
SendableMessage... |
public void processJavaDelta(IJavaElementDelta delta) {
if (DeltaProcessor.VERBOSE){
System.out.println("UPDATING Model with Delta: ["+Thread.currentThread()+":" + delta + "]:");//$NON-NLS-1$//$NON-NLS-2$
}
try {
this.traverseDelta(delta, null, null); // traverse delta
// update package fragment root... | public void processJavaDelta(IJavaElementDelta delta) {
if (DeltaProcessor.VERBOSE){
System.out.println("UPDATING Model with Delta: ["+Thread.currentThread()+":" + delta + "]:");//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
try {
this.traverseDelta(delta, null, null); // traverse delta
// update package... |
public final String toString() {
// allocate a buffer that is large enough to hold an average compilation unit
StringBuffer buffer = new StringBuffer(6000);
int p = buffer.length();
try {
appendDebugString(buffer);
} catch (RuntimeException e) {
// since debugger sometimes call toString methods, proble... | public final String toString() {
// allocate a buffer that is large enough to hold an average compilation unit
StringBuffer buffer = new StringBuffer(6000);
int p = buffer.length();
try {
appendDebugString(buffer);
} catch (RuntimeException e) {
// since debugger sometimes call toString methods, proble... |
public CloseEditorAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("CloseEditorAction.text"), window); //$NON-NLS-1$
setToolTipText(WorkbenchMessages.getString("CloseEditorAction.toolTip")); //$NON-NLS-1$
setId("close"); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IH... | public CloseEditorAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("CloseEditorAction.text"), window); //$NON-NLS-1$
setToolTipText(WorkbenchMessages.getString("CloseEditorAction.toolTip")); //$NON-NLS-1$
setId("close"); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IW... |
public void handleConnect(Figure start, Figure end) {
PertFigure source = (PertFigure)start;
PertFigure target = (PertFigure)end;
if (source.hasCycle(target)) {
setAttribute("FrameColor", Color.red);
}
else {
target.addPreTask(source);
source.addPostTask(target);
source.notifyPostTasks();
}
}
| public void handleConnect(Figure start, Figure end) {
PertFigure source = (PertFigure)start;
PertFigure target = (PertFigure)end;
if (source.hasCycle(target)) {
setAttribute(FigureAttributeConstant.FRAME_COLOR.getName(), Color.red);
}
else {
target.addPreTask(source);
source.addPostTask(target);
... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.