buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public ISourceRange getJavadocRange() throws JavaModelException {
ISourceRange range= this.getSourceRange();
if (range == null) return null;
IBuffer buf= null;
if (this.isBinary()) {
buf = this.getClassFile().getBuffer();
} else {
ICompilationUnit compilationUnit = this.getCompilationUnit();
if (!compilation... | public ISourceRange getJavadocRange() throws JavaModelException {
ISourceRange range= this.getSourceRange();
if (range == null) return null;
IBuffer buf= null;
if (this.isBinary()) {
buf = this.getClassFile().getBuffer();
} else {
ICompilationUnit compilationUnit = this.getCompilationUnit();
if (!compilation... |
protected char[][][] collect() throws JavaModelException {
if (this.type != null) {
// Collect the paths of the cus that are in the hierarchy of the given type
this.result = new char[1][][];
this.resultIndex = 0;
JavaProject javaProject = (JavaProject)this.type.getJavaProject();
this.locator.initializeName... | protected char[][][] collect() throws JavaModelException {
if (this.type != null) {
// Collect the paths of the cus that are in the hierarchy of the given type
this.result = new char[1][][];
this.resultIndex = 0;
JavaProject javaProject = (JavaProject)this.type.getJavaProject();
this.locator.initializeName... |
private void addIssueIdRange(Criteria crit)
throws ScarabException, Exception
{
// check limits to see which ones are present
// if neither are present, do nothing
if ( (minId != null && minId.length() != 0)
|| (maxId != null && maxId.length() != 0) )
{
... | private void addIssueIdRange(Criteria crit)
throws ScarabException, Exception
{
// check limits to see which ones are present
// if neither are present, do nothing
if ( (minId != null && minId.length() != 0)
|| (maxId != null && maxId.length() != 0) )
{
... |
public synchronized void release() {
mutex = false;
notifyAll();
}
| public synchronized void release() {
mutex = false;
notify();
}
|
public void acceptImport(int declarationStart, int declarationEnd, char[] name, boolean onDemand) {
int[] sourceRange = {declarationStart, declarationEnd};
String importName = new String(name);
/** name is set to contain the '*' */
if (onDemand) {
importName+=".*"; //$NON-NLS-1$
}
fNode= new DOMImport(fDocument... | public void acceptImport(int declarationStart, int declarationEnd, char[] name, boolean onDemand) {
int[] sourceRange = {declarationStart, declarationEnd};
String importName = new String(name);
/** name is set to contain the '*' */
if (onDemand) {
importName+=".*"/*nonNLS*/;
}
fNode= new DOMImport(fDocument, so... |
public static final String JK_LOG_LOCATION = "/logs/netscape_redirect.log";
Log loghelper = new Log("tc_log", this);
| public static final String JK_LOG_LOCATION = "/logs/netscape_redirect.log";
Log loghelper = Log.getLog("tc_log", this);
|
public void run() {
try {
Config.save();
} catch (Exception ex) {
ex.printStackTrace();
}
}
} | public void shutdown() {
try {
Config.save();
} catch (Exception ex) {
ex.printStackTrace();
}
}
} |
protected void layoutComponents()
{
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
JPanel mainMiddle = new JPanel();
mainMiddle.setLayout(new BorderLayout());
JPanel... | protected void layoutComponents()
{
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
JPanel mainMiddle = new JPanel();
mainMiddle.setLayout(new BorderLayout());
JPanel... |
private void deletePackageFragment(IPackageFragment frag)
throws JavaModelException {
IResource res = frag.getResource();
if (res != null) {
// collect the children to remove
IJavaElement[] childrenOfInterest = frag.getChildren();
if (childrenOfInterest.length > 0) {
IResource[] resources = new IResource[ch... | private void deletePackageFragment(IPackageFragment frag)
throws JavaModelException {
IResource res = frag.getResource();
if (res != null) {
// collect the children to remove
IJavaElement[] childrenOfInterest = frag.getChildren();
if (childrenOfInterest.length > 0) {
IResource[] resources = new IResource[ch... |
public MessageFolder(FolderItem item, String path) {
super(item);
String dir = path + getUid();
if (DiskIO.ensureDirectory(dir)) {
directoryFile = new File(dir);
}
loadMessageFolderInfo();
}
| public MessageFolder(FolderItem item, String path) {
super(item);
String dir = path + System.getProperty("file.separator")+getUid();
if (DiskIO.ensureDirectory(dir)) {
directoryFile = new File(dir);
}
loadMessageFolderInfo();
}
|
public SubscribeFolderAction(FrameMediator frameMediator) {
super(frameMediator,
MailResourceLoader.getString("menu", "mainframe",
"menu_folder_subscribe"));
// tooltip text
putValue(SHORT_DESCRIPTION,
MailResourceLoader.getString("menu", "mainframe",... | public SubscribeFolderAction(FrameMediator frameMediator) {
super(frameMediator,
MailResourceLoader.getString("menu", "mainframe",
"menu_folder_subscribe"));
// tooltip text
putValue(SHORT_DESCRIPTION,
MailResourceLoader.getString("menu", "mainframe",... |
public final String getLocalizedMessage(int id, String[] problemArguments) {
String message = (String) this.messageTemplates.get(keyFromID(id & IProblem.IgnoreCategoriesMask));
if (message == null) {
return "Unable to retrieve the error message for problem id: " //$NON-NLS-1$
+ (id & IProblem.IgnoreCategoriesMa... | public final String getLocalizedMessage(int id, String[] problemArguments) {
String message = (String) this.messageTemplates.get(keyFromID(id & IProblem.IgnoreCategoriesMask));
if (message == null) {
return "Unable to retrieve the error message for problem id: " //$NON-NLS-1$
+ (id & IProblem.IgnoreCategoriesMa... |
private Binding findSingleStaticImport(char[][] compoundName) {
Binding binding = findImport(compoundName, compoundName.length - 1);
if (!binding.isValidBinding()) return binding;
char[] name = compoundName[compoundName.length - 1];
if (binding instanceof PackageBinding) {
Binding temp = ((PackageBinding) bindin... | private Binding findSingleStaticImport(char[][] compoundName) {
Binding binding = findImport(compoundName, compoundName.length - 1);
if (!binding.isValidBinding()) return binding;
char[] name = compoundName[compoundName.length - 1];
if (binding instanceof PackageBinding) {
Binding temp = ((PackageBinding) bindin... |
public ToDoByType() {
super("By Knowledge Type");
addSubTreeModel(new GoListToTypeToItem());
}
| public ToDoByType() {
super("todo.perspective.type");
addSubTreeModel(new GoListToTypeToItem());
}
|
public JavaSearchNameEnvironment(IJavaProject javaProject, org.eclipse.jdt.core.ICompilationUnit[] copies) {
computeClasspathLocations(javaProject.getProject().getWorkspace().getRoot(), (JavaProject) javaProject);
try {
int length = copies == null ? 0 : copies.length;
this.workingCopies = new HashMap(length);
f... | public JavaSearchNameEnvironment(IJavaProject javaProject, org.eclipse.jdt.core.ICompilationUnit[] copies) {
computeClasspathLocations(javaProject.getProject().getWorkspace().getRoot(), (JavaProject) javaProject);
try {
int length = copies == null ? 0 : copies.length;
this.workingCopies = new HashMap(length);
f... |
private void processCompilationUnitResource(ICompilationUnit source, IPackageFragment dest) throws JavaModelException {
String newCUName = getNewNameFor(source);
String destName = (newCUName != null) ? newCUName : source.getElementName();
String newContent = updatedContent(source, dest, newCUName); // null if unchan... | private void processCompilationUnitResource(ICompilationUnit source, IPackageFragment dest) throws JavaModelException {
String newCUName = getNewNameFor(source);
String destName = (newCUName != null) ? newCUName : source.getElementName();
String newContent = updatedContent(source, dest, newCUName); // null if unchan... |
@Test public void failedAssumptionDoesntCountAsRun() throws Exception {
Result result= new Result();
RunListener listener= result.createListener();
Description someTest= Description.EMPTY;
listener.testStarted(someTest);
listener.testAssumptionInvalid(someTest, null);
listener.testFinished(someTest);
ass... | @Test public void failedAssumptionDoesntCountAsRun() throws Exception {
Result result= new Result();
RunListener listener= result.createListener();
Description someTest= Description.EMPTY;
listener.testStarted(someTest);
listener.testIgnored(someTest);
listener.testFinished(someTest);
assertThat(result.g... |
public PackageFragmentRootInfo() {
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
*/
stat... | public PackageFragmentRootInfo() {
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
*/
stat... |
import org.columba.api.plugin.IExtensionInterface;
package org.columba.core.gui.htmlviewer;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import javax.swing.JComponent;
import org.columba.core.plugin.IExtensionInterface;
/**
* HTML Viewer interface.
*
* @author Frederik Dietz
*... | import org.columba.api.plugin.IExtensionInterface;
package org.columba.core.gui.htmlviewer;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import javax.swing.JComponent;
import org.columba.api.plugin.IExtensionInterface;
/**
* HTML Viewer interface.
*
* @author Frederik Dietz
*/... |
protected ImageRegistry createImageRegistry() {
return new ImageRegistry();
}
| protected ImageRegistry createImageRegistry() {
return new ImageRegistry(Display.getDefault());
}
|
public TableController(AbstractMailFrameController mailFrameController) {
this.mailFrameController = mailFrameController;
headerTableItem =
(TableItem) MailConfig.getMainFrameOptionsConfig().getTableItem();
headerTableModel = new HeaderTableModel(headerTableItem);
view = new TableView(headerTableModel);... | public TableController(AbstractMailFrameController mailFrameController) {
this.mailFrameController = mailFrameController;
headerTableItem =
(TableItem) MailConfig.getMainFrameOptionsConfig().getTableItem();
headerTableModel = new HeaderTableModel(headerTableItem);
view = new TableView(headerTableModel);... |
private BlockedJobsDialog(Shell parentShell, IProgressMonitor blocking,
IStatus blockingStatus) {
super(parentShell == null ? ProgressManagerUtil.getNonModalShell()
: parentShell);
blockingMonitor = blocking;
if (blockingStatus instanceof IJobStatus)
b... | private BlockedJobsDialog(Shell parentShell, IProgressMonitor blocking,
IStatus blockingStatus) {
super(parentShell == null ? ProgressManagerUtil.getNonModalShell()
: parentShell);
blockingMonitor = blocking;
if (blockingStatus instanceof IJobStatus)
b... |
public String[] getRequiredProjectNames() throws JavaModelException {
return this.projectPrerequisites(getExpandedClasspath(true));
}
| public String[] getRequiredProjectNames() throws JavaModelException {
return this.projectPrerequisites(getResolvedClasspath(true));
}
|
public void addAction(String actionId, AbstractColumbaAction action) {
// generate xml element describing action
XmlElement element = new XmlElement("action");
element.addAttribute("name", actionId);
String clazzString = action.getClass().getCanonicalName();
element.addAttribute("class", clazzString);
par... | public void addAction(String actionId, AbstractColumbaAction action) {
// generate xml element describing action
XmlElement element = new XmlElement("action");
element.addAttribute("name", actionId);
String clazzString = action.getClass().getName();
element.addAttribute("class", clazzString);
parentNode.a... |
public PropPanelEvent(
String name,
ImageIcon icon,
Orientation orientation) {
super(name, icon, orientation);
JList paramList =
new UMLLinkedList(this, new UMLEventParameterListModel(this));
paramScroll = new JScrollPane(paramList);
new PropPanelB... | public PropPanelEvent(
String name,
ImageIcon icon,
Orientation orientation) {
super(name, icon, orientation);
JList paramList =
new UMLLinkedList(this, new UMLEventParameterListModel());
paramScroll = new JScrollPane(paramList);
new PropPanelButto... |
public void setJavaConventionsSettings() {
this.allocation_expression_arguments_alignment = Integer.parseInt(DefaultCodeFormatterConstants.FORMATTER_COMPACT_SPLIT);
this.anonymous_type_declaration_brace_position = DefaultCodeFormatterConstants.END_OF_LINE;
this.array_initializer_brace_position = DefaultCodeForma... | public void setJavaConventionsSettings() {
this.allocation_expression_arguments_alignment = Integer.parseInt(DefaultCodeFormatterConstants.FORMATTER_COMPACT_SPLIT);
this.anonymous_type_declaration_brace_position = DefaultCodeFormatterConstants.END_OF_LINE;
this.array_initializer_brace_position = DefaultCodeForma... |
public void describeLayout(StringBuffer buf) {
if (detachable) {
if(detachedWindowList.size() != 0){
buf.append("detachedWindows ("); //$NON-NLS-1$
for (int i = 0, length = detachedWindowList.size(); i < length; i++) {
DetachedWindow wind... | public void describeLayout(StringBuffer buf) {
if (detachable) {
if(detachedWindowList.size() != 0){
buf.append("detachedWindows ("); //$NON-NLS-1$
for (int i = 0, length = detachedWindowList.size(); i < length; i++) {
DetachedWindow wind... |
public Annotation(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int index = u2At(classFileBytes, 0, offset);
this.typeIndex = index;
if (index != 0) {
IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
if (constantPoolEn... | public Annotation(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int index = u2At(classFileBytes, 0, offset);
this.typeIndex = index;
if (index != 0) {
IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
if (constantPoolEn... |
public void test8() throws Exception {
socketAppender = new SocketAppender("localhost", PORT);
socketAppender.setLocationInfo(true);
rootLogger.addAppender(socketAppender);
NDC.push("some8");
common("T8", "key8", "MDC-TEST8");
NDC.pop();
delay(2);
ControlFilter cf =
new Control... | public void test8() throws Exception {
socketAppender = new SocketAppender("localhost", PORT);
socketAppender.setLocationInfo(true);
rootLogger.addAppender(socketAppender);
NDC.push("some8");
common("T8", "key8", "MDC-TEST8");
NDC.pop();
delay(2);
ControlFilter cf =
new Control... |
public void addChild( ObjectName pChild ) {
Hashtable lProperties = pChild.getKeyPropertyList();
String lType = lProperties.get( "type" ) + "";
if( "Application".equals( lType ) ) {
mApplications.add( pChild );
} else if( "Node".equals( lType ) ) {
mNodes.add( pChild );
... | public void addChild( ObjectName pChild ) {
Hashtable lProperties = pChild.getKeyPropertyList();
String lType = lProperties.get( "type" ) + "";
if( "J2EEApplication".equals( lType ) ) {
mApplications.add( pChild );
} else if( "Node".equals( lType ) ) {
mNodes.add( pChild );
... |
public static String id() {
return "4.5-SNAPSHOT-20080602-1631";
}
| public static String id() {
return "4.5-SNAPSHOT-20080603-1001";
}
|
public void componentAdded(ContainerEvent e) {
LOG.info("Re-registering as observer on editor controller");
((ComposerController) getController()).getEditorController()
.addObserver(this);
}
| public void componentAdded(ContainerEvent e) {
LOG.info("Re-registering as observer on editor controller");
((ComposerController) getFrameMediator()).getEditorController()
.addObserver(this);
}
|
public PropPanelPackage() {
this("Package", _packageIcon, 2);
}
PropPanelPackage(String name, ImageIcon icon, int columns) {
super(name, icon, columns);
Class mclass = MPackage.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo... | public PropPanelPackage() {
this("Package", _packageIcon, 2);
}
PropPanelPackage(String name, ImageIcon icon, int columns) {
super(name, icon, columns);
Class mclass = MPackage.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo... |
public void acceptMethod(char[] declaringTypePackageName, char[] declaringTypeName, String enclosingDeclaringTypeSignature, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, boolean isConstructor, boolean isDeclaration, char[] uniqueKey, int start, int end) {
I... | public void acceptMethod(char[] declaringTypePackageName, char[] declaringTypeName, String enclosingDeclaringTypeSignature, char[] selector, char[][] parameterPackageNames, char[][] parameterTypeNames, String[] parameterSignatures, boolean isConstructor, boolean isDeclaration, char[] uniqueKey, int start, int end) {
I... |
public int addContext(ContextManager cm, Context ctx) {
// Make sure context knows about its manager.
ctx.setContextManager( cm );
setEngineHeader( ctx );
if( ctx.getWorkDir() == null)
setWorkDir(ctx);
// Set default session manager if none set
if( ctx.getSessionManager() == null )
ctx.setSessio... | public int addContext(ContextManager cm, Context ctx) {
// Make sure context knows about its manager.
ctx.setContextManager( cm );
setEngineHeader( ctx );
if( ctx.getWorkDir() == null)
setWorkDir(ctx);
// Set default session manager if none set
if( ctx.getSessionManager() == null )
ctx.setSessio... |
public void shutdown()
{
for ( int i=0; i<list.size(); i++ )
{
ShutdownPluginInterface plugin = (ShutdownPluginInterface) list.get(i);
plugin.run();
}
System.exit(1);
}
| public void shutdown()
{
for ( int i=0; i<list.size(); i++ )
{
ShutdownPluginInterface plugin = (ShutdownPluginInterface) list.get(i);
plugin.shutdown();
}
System.exit(1);
}
|
private void getProblemsForPath(IPath path, Vector vResults) {
for (Enumeration e = fState.getProblemReporter().getProblemKeys(); e.hasMoreElements();) {
SourceEntry sEntry = (SourceEntry)e.nextElement();
IPath sEntryPath = sEntry.getPath();
if (path.isPrefixOf(sEntryPath)) {
String extension = sEntryPath.get... | private void getProblemsForPath(IPath path, Vector vResults) {
for (Enumeration e = fState.getProblemReporter().getProblemKeys(); e.hasMoreElements();) {
SourceEntry sEntry = (SourceEntry)e.nextElement();
IPath sEntryPath = sEntry.getPath();
if (path.isPrefixOf(sEntryPath)) {
String extension = sEntryPath.get... |
public void mouseReleased(MouseEvent evt)
{
int row = results.locationToIndex(evt.getPoint());
if(row != -1)
{
Result result = (Result)results.getModel()
.getElementAt(row);
helpViewer.gotoURL(result.file,true);
}
}
} //}}}
} | public void mouseReleased(MouseEvent evt)
{
int row = results.locationToIndex(evt.getPoint());
if(row != -1)
{
Result result = (Result)results.getModel()
.getElementAt(row);
helpViewer.gotoURL(result.file,true, 0);
}
}
} //}}}
} |
private final void normalizeSites(final List submissionsToModify) {
if (disposed) return;
final int size = submissionsToModify.size();
for (int i = 0; i < size; i++) {
final Object submission = submissionsToModify.get(i);
final Object replacementSubmission;
... | private final void normalizeSites(final List submissionsToModify) {
if (disposed) return;
final int size = submissionsToModify.size();
for (int i = 0; i < size; i++) {
final Object submission = submissionsToModify.get(i);
final Object replacementSubmission;
... |
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nullReq... | protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nullReq... |
public void generateOptimizedBooleanEqual(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
// optimized cases: true == x, false == x
if (left.constant != NotAConstant) {
boolean inline = left.constant.booleanValue();
right.generateOptimizedBoolean(... | public void generateOptimizedBooleanEqual(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
// optimized cases: true == x, false == x
if (left.constant != NotAConstant) {
boolean inline = left.constant.booleanValue();
right.generateOptimizedBoolean(... |
public void actionPerformed(ActionEvent e) {
LogPanel p = logui.getCurrentLogPanel();
if (p != null) {
p.findPrevious();
}
}
};
// action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_F));
action.putValue(
Action.ACCELERATOR_KEY,... | public void actionPerformed(ActionEvent e) {
LogPanel p = logui.getCurrentLogPanel();
if (p != null) {
p.findPrevious();
}
}
};
// action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_F));
action.putValue(
Action.ACCELERATOR_KEY,... |
private void computeIndexes() {
ArrayList indexesInScope = new ArrayList();
IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace() .getRoot();
for (int i = 0; i < projectsAndJars.length; i++) {
IPath location;
IPath path = projectsAndJars[i];
... | private void computeIndexes() {
ArrayList indexesInScope = new ArrayList();
IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace() .getRoot();
for (int i = 0; i < projectsAndJars.length; i++) {
IPath location;
IPath path = projectsAndJars[i];
... |
protected String getMainTaskName() {
return Util.bind("operation.renameElementProgress"); //$NON-NLS-1$
}
| protected String getMainTaskName() {
return Util.bind("operation.renameElementProgress"/*nonNLS*/);
}
|
public ExternalJavaProject(IClasspathEntry[] rawClasspath) {
super(ResourcesPlugin.getWorkspace().getRoot().getProject(EXTERNAL_PROJECT_NAME), JavaModelManager.getJavaModelManager().getJavaModel());
try {
getPerProjectInfo().rawClasspath = rawClasspath;
} catch (JavaModelException e) {
// getPerProjectInfo... | public ExternalJavaProject(IClasspathEntry[] rawClasspath) {
super(ResourcesPlugin.getWorkspace().getRoot().getProject(EXTERNAL_PROJECT_NAME), JavaModelManager.getJavaModelManager().getJavaModel());
try {
getPerProjectInfo().setClasspath(rawClasspath, defaultOutputLocation(), JavaModelStatus.VERIFIED_OK/*no .cl... |
public int getNodeType() {
return BLOCK;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
Block result = new Block(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.statements().addAll(
... | public int getNodeType() {
return BLOCK;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
Block result = new Block(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.statements().addAll(
... |
protected void storeProblemsFor(IResource resource, IProblem[] problems) throws CoreException {
if (resource == null || problems == null || problems.length == 0) return;
String missingClassFile = null;
for (int i = 0, length = problems.length; i < length; i++) {
IProblem problem = problems[i];
int id = problem.... | protected void storeProblemsFor(IResource resource, IProblem[] problems) throws CoreException {
if (resource == null || problems == null || problems.length == 0) return;
String missingClassFile = null;
for (int i = 0, length = problems.length; i < length; i++) {
IProblem problem = problems[i];
int id = problem.... |
public String getLabel() {
return descriptor == null ? RESOURCE_BUNDLE
.getString("DefaultTheme.label") : descriptor.getLabel(); //$NON-NLS-1$
}
| public String getLabel() {
return descriptor == null ? RESOURCE_BUNDLE
.getString("DefaultTheme.label") : descriptor.getName(); //$NON-NLS-1$
}
|
import org.columba.addressbook.model.IBasicModelPartial;
// 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 distribu... | import org.columba.addressbook.model.IBasicModelPartial;
// 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 distribu... |
public ICompilationUnit[] getCompilationUnits(WorkingCopyOwner owner) {
ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner, false/*don't add primary*/);
if (workingCopies == null) return JavaModelManager.NoWorkingCopy;
int length = workingCopies.length;
ICompilationUnit... | public ICompilationUnit[] getCompilationUnits(WorkingCopyOwner owner) {
ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner, false/*don't add primary*/);
if (workingCopies == null) return JavaModelManager.NO_WORKING_COPY;
int length = workingCopies.length;
ICompilationUn... |
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, <ocl>self</ocl>, 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 creat... |
public boolean search(IIndex index, IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
if (index == null) return COMPLETE;
ReadWriteMonitor monitor = indexManager.getMonitorFor(index);
if (monitor == null) return COMPLETE; // ... | public boolean search(IIndex index, IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
if (index == null) return COMPLETE;
ReadWriteMonitor monitor = indexManager.getMonitorFor(index);
if (monitor == null) return COMPLETE; // ... |
public void delete(ScarabUser user) throws Exception
{
Criteria c = new Criteria()
.add(RAttributeAttributeGroupPeer.GROUP_ID, getGroupId())
.add(RAttributeAttributeGroupPeer.ATTRIBUTE_ID, getAttributeId());
RAttributeAttributeGroupPeer.doDelete(c);
}
} | public void delete() throws Exception
{
Criteria c = new Criteria()
.add(RAttributeAttributeGroupPeer.GROUP_ID, getGroupId())
.add(RAttributeAttributeGroupPeer.ATTRIBUTE_ID, getAttributeId());
RAttributeAttributeGroupPeer.doDelete(c);
}
} |
public final static char[][] splitTypeLevelsSignature(String typeSignature) {
// In case of IJavaElement signature, replace '$' by '.'
char[] source = Signature.removeCapture(typeSignature.toCharArray());
CharOperation.replace(source, '$', '.');
// Init counters and arrays
char[][] signatures = new char[10]... | public final static char[][] splitTypeLevelsSignature(String typeSignature) {
// In case of IJavaElement signature, replace '$' by '.'
char[] source = Signature.removeCapture(typeSignature.toCharArray());
CharOperation.replace(source, '$', '.');
// Init counters and arrays
char[][] signatures = new char[10]... |
public IAnnotation[] getAnnotations() throws JavaModelException {
IBinaryField info = (IBinaryField) getElementInfo();
IBinaryAnnotation[] binaryAnnotations = info.getAnnotations();
return getAnnotations(binaryAnnotations);
}
| public IAnnotation[] getAnnotations() throws JavaModelException {
IBinaryField info = (IBinaryField) getElementInfo();
IBinaryAnnotation[] binaryAnnotations = info.getAnnotations();
return getAnnotations(binaryAnnotations, info.getTagBits());
}
|
public ColumbaMessage fetchMessage(int index) throws Exception {
isLogin();
String rawString = protocol.fetchMessage(new Integer(index).toString());
if (rawString.length() == 0)
return null;
// pipe through preprocessing filter
if (popItem.getBoolean("enable_pop3preprocessingfilter", false))
rawStrin... | public ColumbaMessage fetchMessage(int index) throws Exception {
isLogin();
String rawString = protocol.fetchMessage(new Integer(index).toString());
if (rawString.length() == 0)
return null;
// pipe through preprocessing filter
if (popItem.getBoolean("enable_pop3preprocessingfilter", false))
rawStrin... |
public
static
void main(String args[]) {
if(args.length != 1) {
usage();
}
DOMConfigurator.configure("stressAsyncAppender.xml");
try {
maxThreads = Integer.parseInt(args[0]);
}
catch(java.lang.NumberFormatException e) {
System.err.println(e);
usage();
}
... | public
static
void main(String args[]) {
if(args.length != 1) {
usage();
}
DOMConfigurator.configure("xml/stressAsyncAppender.xml");
try {
maxThreads = Integer.parseInt(args[0]);
}
catch(java.lang.NumberFormatException e) {
System.err.println(e);
usage();
}... |
public
static
void push(String message) {
Thread key = Thread.currentThread();
Stack stack = (Stack) ht.get(key);
if(stack == null) {
DiagnosticContext dc = new DiagnosticContext(message, null);
stack = new Stack();
ht.put(key, stack);
stack.push(dc);
} else if... | public
static
void push(String message) {
Thread key = Thread.currentThread();
Stack stack = (Stack) ht.get(key);
if(stack == null) {
DiagnosticContext dc = new DiagnosticContext(message, null);
stack = new Stack();
ht.put(key, stack);
stack.push(dc);
} else if... |
public boolean visit(SingleVariableDeclaration node) {
if (node.getAST().apiLevel() == AST.LEVEL_2_0) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.LEVEL_3_0) {
printModifiers(node.modifiers());
}
node.getType().accept(this);
if (node.getAST().apiLevel() >= AST.LEVEL_3_... | public boolean visit(SingleVariableDeclaration node) {
if (node.getAST().apiLevel() == AST.LEVEL_2_0) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.LEVEL_3_0) {
printModifiers(node.modifiers());
}
node.getType().accept(this);
if (node.getAST().apiLevel() >= AST.LEVEL_3_... |
private static IClasspathEntry getRealClasspathEntry(IJavaProject jproject, IPath containerPath, IPath libPath) throws JavaModelException {
IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
if (container != null) {
IClasspathEntry[] entries= container.getClasspathEntries();... | private static IClasspathEntry getRealClasspathEntry(IJavaProject jproject, IPath containerPath, IPath libPath) throws JavaModelException {
IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
if (container != null) {
IClasspathEntry[] entries= container.getClasspathEntries();... |
private void lastPartClosePerspective() {
Perspective persp = getActivePerspective();
if (persp != null && getActivePart() == null)
if(persp.getViewReferences().length == 0 || getEditorReferences().length == 0)
closePerspective(persp, false);
}
| private void lastPartClosePerspective() {
Perspective persp = getActivePerspective();
if (persp != null && getActivePart() == null)
if(persp.getViewReferences().length == 0 && getEditorReferences().length == 0)
closePerspective(persp, false);
}
|
public TypeBinding resolveType(BlockScope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
constant = NotAConstant;
if (this.type == null) {
// initialization of an enum constant
this.resolvedType = scope.enclosingSourceType();
} else {
this.resolvedT... | public TypeBinding resolveType(BlockScope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
constant = NotAConstant;
if (this.type == null) {
// initialization of an enum constant
this.resolvedType = scope.enclosingSourceType();
} else {
this.resolvedT... |
public RecoveredElement buildInitialRecoveryState(){
/* initialize recovery by retrieving available reduced nodes
* also rebuild bracket balance
*/
lastCheckPoint = 0;
RecoveredElement element = null;
if (referenceContext instanceof CompilationUnitDeclaration){
element = new RecoveredUnit(compilationUnit,... | public RecoveredElement buildInitialRecoveryState(){
/* initialize recovery by retrieving available reduced nodes
* also rebuild bracket balance
*/
lastCheckPoint = 0;
RecoveredElement element = null;
if (referenceContext instanceof CompilationUnitDeclaration){
element = new RecoveredUnit(compilationUnit,... |
public void addFileAttachment() {
int returnValue;
File[] files;
fileChooser.setDialogTitle(MailResourceLoader.getString("menu","mainframe","composer_attach_file")); //$NON-NLS-1$
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setMultiSelectionEnabled(true);
returnValue = fileChoos... | public void addFileAttachment() {
int returnValue;
File[] files;
fileChooser.setDialogTitle(MailResourceLoader.getString("menu","composer","menu_message_attachFile")); //$NON-NLS-1$
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setMultiSelectionEnabled(true);
returnValue = fileCho... |
private IExtensionHandler getExtensionHandler() {
if (extensionHandler == null) {
try {
// retrieve plugin manager instance
IPluginManager pm = null;
try {
pm = (IPluginManager) ServiceRegistry
.getInstance().getService(IPluginManager.class);
} catch (ServiceNotFoundException e) {
... | private IExtensionHandler getExtensionHandler() {
if (extensionHandler == null) {
try {
// retrieve plugin manager instance
IPluginManager pm = null;
try {
pm = (IPluginManager) ServiceRegistry
.getInstance().getService(IPluginManager.class);
} catch (ServiceNotFoundException e) {
... |
public FetchMessageSubMenu(FrameMediator controller) {
super(controller,
MailResourceLoader.getString("menu", "mainframe",
"menu_file_checkmessage"));
createMenu();
// register interest on account changes
MailCheckingManager.getInstance().addObserver(thi... | public FetchMessageSubMenu(FrameMediator controller) {
super(controller,
MailResourceLoader.getString("menu", "mainframe",
"menu_file_checkmessage"),"menu_file_checkmessage");
createMenu();
// register interest on account changes
MailCheckingManager.getI... |
public void execute() throws Exception
{
if( args!=null )
processArgs( args );
Vector v=new Vector();
String commonDir=installDir + File.separator + "lib" +
File.separator + "container";
IntrospectionUtils.addToClassPath( v, commonDir);
IntrospectionUtils.addToolsJar(v);
String containerDir=inst... | public void execute() throws Exception
{
if( args!=null )
processArgs( args );
Vector v=new Vector();
String commonDir=installDir + File.separator + "lib" +
File.separator + "common";
IntrospectionUtils.addToClassPath( v, commonDir);
IntrospectionUtils.addToolsJar(v);
String containerDir=install... |
private void setActivePart(IWorkbenchPart newPart) {
// Optimize it.
if (activePart == newPart)
return;
//No need to change the history if the active editor is becoming the active part
boolean markLocation = newPart != lastActiveEditor;
String label = newPart != null ? newPart.getTitle() : "none"; //$NON-NLS-1$... | private void setActivePart(IWorkbenchPart newPart) {
// Optimize it.
if (activePart == newPart)
return;
//No need to change the history if the active editor is becoming the active part
boolean markLocation = newPart != lastActiveEditor;
String label = newPart != null ? newPart.getTitle() : "none"; //$NON-NLS-1$... |
public EditActionSetsAction() {
this(((Workbench)PlatformUI.getWorkbench()).getActiveWorkbenchWindow());
}
| public EditActionSetsAction() {
this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
}
|
public CmdLineArgumentHandler(ColumbaCmdLineParser cmdLineParser) {
String mailURL = cmdLineParser.getMailurlOption();
if (mailURL != null) {
if (MailUrlParser.isMailUrl(mailURL)) {
MailUrlParser mailToParser = new MailUrlParser(mailURL);
cmdLineParser.se... | public CmdLineArgumentHandler(ColumbaCmdLineParser cmdLineParser) {
String mailURL = cmdLineParser.getMailurlOption();
if (mailURL != null) {
if (MailUrlParser.isMailUrl(mailURL)) {
MailUrlParser mailToParser = new MailUrlParser(mailURL);
cmdLineParser.se... |
protected void generateInfos(Object info, HashMap newElements, IProgressMonitor pm) throws JavaModelException {
Openable openableParent = (Openable)getOpenableParent();
if (openableParent == null) return;
ClassFileInfo openableParentInfo = (ClassFileInfo) JavaModelManager.getJavaModelManager().getInfo((IJavaElemen... | protected void generateInfos(Object info, HashMap newElements, IProgressMonitor pm) throws JavaModelException {
Openable openableParent = (Openable)getOpenableParent();
if (openableParent == null) return;
ClassFileInfo openableParentInfo = (ClassFileInfo) JavaModelManager.getJavaModelManager().getInfo(openablePare... |
public void start(
Object pServer
) throws IllegalArgumentException {
if( pServer == null ) {
throw new IllegalArgumentException( "Server cannot be null. "
+ "To close the connection use stop()" );
}
try {
InitialContext lNamingContext = new InitialContext();
System.out.println( "RMIClientConnect... | public void start(
Object pServer
) throws IllegalArgumentException {
if( pServer == null ) {
throw new IllegalArgumentException( "Server cannot be null. "
+ "To close the connection use stop()" );
}
try {
InitialContext lNamingContext = new InitialContext();
System.out.println( "RMIClientConnect... |
public int registerHooks(Hooks h) {
return DECLINED;
}
} | public int registerHooks(Hooks h, ContextManager cm, Context ctx) {
return DECLINED;
}
} |
public IntLiteralMinValue() {
super(CharValue,0,0,Integer.MIN_VALUE);
constant = MIN_VALUE;
}
| public IntLiteralMinValue() {
super(CharValue,0,0,Integer.MIN_VALUE);
this.constant = MIN_VALUE;
}
|
public TypeBinding resolveType(BlockScope scope) {
// added for code assist...cannot occur with 'normal' code
if (this.anonymousType == null && this.enclosingInstance == null) {
return super.resolveType(scope);
}
// Propagate the type checking to the arguments, and checks if the constructor is defined.
/... | public TypeBinding resolveType(BlockScope scope) {
// added for code assist...cannot occur with 'normal' code
if (this.anonymousType == null && this.enclosingInstance == null) {
return super.resolveType(scope);
}
// Propagate the type checking to the arguments, and checks if the constructor is defined.
/... |
public void append(LoggingEvent event) {
StringBuffer sbuf = new StringBuffer();
sbuf.append(layout.format(event));
if(layout.ignoresThrowable()) {
String[] s = event.getThrowableStrRep();
if (s != null) {
int len = s.length;
for(int i = 0; i < len; i++) {
sbuf.append(s[i]);
}
}
... | public void append(LoggingEvent event) {
StringBuffer sbuf = new StringBuffer();
sbuf.append(layout.format(event));
if(layout.ignoresThrowable()) {
String[] s = event.getThrowableStrRep();
if (s != null) {
int len = s.length;
for(int i = 0; i < len; i++) {
sbuf.append(s[i]);
}
}
... |
public final ASTNode newPlaceholderNode(int nodeType) {
try {
ASTNode node= this.ast.createInstance(nodeType);
switch (node.getNodeType()) {
case ASTNode.FIELD_DECLARATION:
((FieldDeclaration) node).fragments().add(this.ast.newVariableDeclarationFragment());
break;
case ASTNode... | public final ASTNode newPlaceholderNode(int nodeType) {
try {
ASTNode node= this.ast.createInstance(nodeType);
switch (node.getNodeType()) {
case ASTNode.FIELD_DECLARATION:
((FieldDeclaration) node).fragments().add(this.ast.newVariableDeclarationFragment());
break;
case ASTNode... |
public void resolveStatements() {
if (!CharOperation.equals(this.scope.enclosingSourceType().sourceName, selector)){
this.scope.problemReporter().missingReturnType(this);
}
if (this.typeParameters != null) {
for (int i = 0, length = this.typeParameters.length; i < length; i++) {
this.typeParameters[i... | public void resolveStatements() {
if (!CharOperation.equals(this.scope.enclosingSourceType().sourceName, selector)){
this.scope.problemReporter().missingReturnType(this);
}
if (this.typeParameters != null) {
for (int i = 0, length = this.typeParameters.length; i < length; i++) {
this.typeParameters[i... |
public void generateClassLiteralAccessForType(TypeBinding accessedType, FieldBinding syntheticFieldBinding) {
Label endLabel;
ExceptionLabel anyExceptionHandler;
int saveStackSize;
if (accessedType.isBaseType()) {
this.getTYPE(accessedType.id);
return;
}
endLabel = new Label(this);
if (syntheticFieldBinding... | public void generateClassLiteralAccessForType(TypeBinding accessedType, FieldBinding syntheticFieldBinding) {
Label endLabel;
ExceptionLabel anyExceptionHandler;
int saveStackSize;
if (accessedType.isBaseType() && accessedType != NullBinding) {
this.getTYPE(accessedType.id);
return;
}
endLabel = new Label(thi... |
public String toString() {
// don't use + with char[]
return new StringBuffer("TypeHierarchyIndictment(").append(fName).append(")").toString();
}
| public String toString() {
// don't use + with char[]
return new StringBuffer("TypeHierarchyIndictment("/*nonNLS*/).append(fName).append(")"/*nonNLS*/).toString();
}
|
public int getNodeType() {
return CATCH_CLAUSE;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
CatchClause result = new CatchClause(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setBody((Block) getBody().clone(target)... | public int getNodeType() {
return CATCH_CLAUSE;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
CatchClause result = new CatchClause(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setBody((Block) getBody().clone(target... |
public MessageFolder createFolder(int folderId) {
try {
IMAPFolder folder = new IMAPFolder(namebase + Integer.toString(folderId),"IMAPFolder", FolderTstHelper.homeDirectory + "/folders/");
inbox.addSubfolder( folder );
/*
((AbstractFolder)MailInterface.treeModel.getRoot()).add(cyrusRoot);
((AbstractFolde... | public AbstractMessageFolder createFolder(int folderId) {
try {
IMAPFolder folder = new IMAPFolder(namebase + Integer.toString(folderId),"IMAPFolder", FolderTstHelper.homeDirectory + "/folders/");
inbox.addSubfolder( folder );
/*
((AbstractFolder)MailInterface.treeModel.getRoot()).add(cyrusRoot);
((Abstr... |
public void computeLocalVariablePositions(
int initOffset,
CodeStream codeStream) {
this.offset = initOffset;
this.maxOffset = initOffset;
// local variable init
int ilocal = 0, maxLocals = 0, localsLength = locals.length;
while ((maxLocals < localsLength) && (locals[maxLocals] != null))
maxLocals++... | public void computeLocalVariablePositions(
int initOffset,
CodeStream codeStream) {
this.offset = initOffset;
this.maxOffset = initOffset;
// local variable init
int ilocal = 0, maxLocals = 0, localsLength = locals.length;
while ((maxLocals < localsLength) && (locals[maxLocals] != null))
maxLocals++... |
protected Control createDialogArea(Composite parent) {
// Run super.
Composite composite = (Composite) super.createDialogArea(parent);
composite.setFont(parent.getFont());
createFilteredTreeViewer(composite);
layoutTopControl(filteredTree.getViewer().getControl());
... | protected Control createDialogArea(Composite parent) {
// Run super.
Composite composite = (Composite) super.createDialogArea(parent);
composite.setFont(parent.getFont());
createFilteredTreeViewer(composite);
layoutTopControl(filteredTree);
// Restore the last stat... |
public NewMessageAction(AbstractFrameController controller) {
super(controller,
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_new"));
setToolBarName(
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_new_toolbar"));
setTooltipText(
MailResourceLoader.get... | public NewMessageAction(AbstractFrameController controller) {
super(controller,
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_new"));
setToolBarText(
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_new_toolbar"));
setTooltipText(
MailResourceLoader.get... |
package DNS.utils;
// Copyright (c) 1999 Brian Wellington (bwelling@xbill.org)
// Portions Copyright (c) 1999 Network Associates, Inc.
package DNS;
import java.io.*;
public class md5 {
static final int S11 = 7;
static final int S12 = 12;
static final int S13 = 17;
static final int S14 = 22;
static final int S21 = ... | package DNS.utils;
// Copyright (c) 1999 Brian Wellington (bwelling@xbill.org)
// Portions Copyright (c) 1999 Network Associates, Inc.
package DNS.utils;
import java.io.*;
public class md5 {
static final int S11 = 7;
static final int S12 = 12;
static final int S13 = 17;
static final int S14 = 22;
static final int ... |
public FilterActionPluginHandler() {
super(
"org.columba.mail.filteraction",
"org/columba/mail/filter/filter_actions.xml",
"actionlist");
}
| public FilterActionPluginHandler() {
super(
"org.columba.mail.filteraction",
"org/columba/mail/plugin/filter_actions.xml",
"actionlist");
}
|
public FigNode getFigNodeFor(GraphModel gm, Layer lay, Object node) {
if (node instanceof MNode) return new FigMNode(gm, node);
else if (node instanceof MNodeInstance) return new FigMNodeInstance(gm, node);
else if (node instanceof MComponent) return new FigComponent(gm, node);
else if (node instance... | public FigNode getFigNodeFor(GraphModel gm, Layer lay, Object node) {
if (node instanceof MNode) return new FigMNode(gm, node);
else if (node instanceof MNodeInstance) return new FigMNodeInstance(gm, node);
else if (node instanceof MComponent) return new FigComponent(gm, node);
else if (node instance... |
private void appendOutputForConstantString(IConstantPoolEntry constantPoolEntry) {
this.buffer
.append(Util.bind("disassembler.constantstring")) //$NON-NLS-1$
.append(constantPoolEntry.getStringValue())
.append(Util.bind("disassembler.closeconstant")); //$NON-NLS-1$
}
| private void appendOutputForConstantString(IConstantPoolEntry constantPoolEntry) {
this.buffer
.append(Util.bind("disassembler.constantstring")) //$NON-NLS-1$
.append(constantPoolEntry.getStringValue())
.append(Util.bind("disassembler.closeconstantstring")); //$NON-NLS-1$
}
|
public void indexDocument() {
// Create a new Parser
SourceIndexerRequestor requestor = new SourceIndexerRequestor(this);
String documentPath = this.document.getPath();
SourceElementParser parser = ((InternalSearchDocument) this.document).parser;
if (parser == null) {
IPath path = new Path(documentPath);
... | public void indexDocument() {
// Create a new Parser
SourceIndexerRequestor requestor = new SourceIndexerRequestor(this);
String documentPath = this.document.getPath();
SourceElementParser parser = ((InternalSearchDocument) this.document).parser;
if (parser == null) {
IPath path = new Path(documentPath);
... |
private final IWorkbench workbench;
/**
* Constructs a new instance of <code>KeyBindingState</code> with an
* empty key sequence, set to reset fully.
*
* @param workbenchToNotify
* The workbench that this state should keep advised of changes
* to the key binding state; must not be ... | private final IWorkbench workbench;
/**
* Constructs a new instance of <code>KeyBindingState</code> with an
* empty key sequence, set to reset fully.
*
* @param workbenchToNotify
* The workbench that this state should keep advised of changes
* to the key binding state; must not be ... |
public DialingExample() {
try {
model = new Model("DialingExample");
phoneClass = new MMClass("Phone");
sm = new StateMachine("States", phoneClass);
top = new CompositeState();
idle = new SimpleState("Idle");
active = new CompositeState("Active");
active.set... | public DialingExample() {
try {
model = new Model("DialingExample");
phoneClass = new MMClass("Phone");
sm = new StateMachine("States", phoneClass);
top = new CompositeState();
idle = new SimpleState("Idle");
active = new CompositeState("Active");
active.set... |
public IEditorActionBarContributor readActionExtensions(
IEditorDescriptor desc, IActionBars bars) {
ExternalContributor ext = null;
readContributions(desc.getId(), TAG_CONTRIBUTION_TYPE,
IWorkbenchConstants.PL_EDITOR_ACTIONS);
if (cache != null) {
ext... | public IEditorActionBarContributor readActionExtensions(
IEditorDescriptor desc) {
ExternalContributor ext = null;
readContributions(desc.getId(), TAG_CONTRIBUTION_TYPE,
IWorkbenchConstants.PL_EDITOR_ACTIONS);
if (cache != null) {
ext = new ExternalCon... |
private List filteredEditors() {
if(!RoleManager.getInstance().filterRoles)
return editors;
ArrayList filtered = new ArrayList();
RoleManager manager = RoleManager.getInstance();
Iterator editorsIterator = editors.iterator();
while (editorsIterator.hasNext()) {
IEditorDescriptor next = (IEditorDes... | private List filteredEditors() {
if(!RoleManager.getInstance().isFiltering())
return editors;
ArrayList filtered = new ArrayList();
RoleManager manager = RoleManager.getInstance();
Iterator editorsIterator = editors.iterator();
while (editorsIterator.hasNext()) {
IEditorDescriptor next = (IEditorD... |
public MoveMessageAction(AbstractFrameController frameController) {
super(
frameController,
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_move"));
// toolbar text
setToolBarName(
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_move_toolbar"));
// ... | public MoveMessageAction(AbstractFrameController frameController) {
super(
frameController,
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_move"));
// toolbar text
setToolBarText(
MailResourceLoader.getString(
"menu", "mainframe", "menu_message_move_toolbar"));
// ... |
public void reset()
{
if(Debug.SCROLL_DEBUG)
Log.log(Log.DEBUG,this,"reset()");
int oldPhysicalLine = physicalLine;
physicalLine = 0;
scrollLine = 0;
int i = displayManager.getFirstVisibleLine();
for(;;)
{
if(i >= oldPhysicalLine)
break;
int before = scrollLine;
displayManager.update... | public void reset()
{
if(Debug.SCROLL_DEBUG)
Log.log(Log.DEBUG,this,"reset()");
int oldPhysicalLine = physicalLine;
physicalLine = 0;
scrollLine = 0;
int i = displayManager.getFirstVisibleLine();
for(;;)
{
if(i >= oldPhysicalLine)
break;
int before = scrollLine;
displayManager.update... |
public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
if (pb == null) return;
pb.selectTabNamed("action.properties");
}
| public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.getInstance();
if (pb == null) return;
pb.selectTabNamed("action.properties");
}
|
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// must verify that exceptions potentially thrown by this expression are caught in the method.
try {
((MethodScope) currentScope).isConstructorCall = true;
// process enclosing instance
if (this.qualificat... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// must verify that exceptions potentially thrown by this expression are caught in the method.
try {
((MethodScope) currentScope).isConstructorCall = true;
// process enclosing instance
if (this.qualificat... |
public static HelpListener createHelpListener(ICommand command) {
return PlatformUI.getWorkbench().getHelpSystem().createHelpListener(command);
}
| public static HelpListener createHelpListener(ICommand command) {
return WorkbenchHelpSystem.getInstance().createHelpListener(command);
}
|
private boolean isRuntimeInvisible(Annotation annotation) {
final TypeBinding annotationBinding = annotation.resolvedType;
if (annotationBinding == null) {
return false;
}
long metaTagBits = annotationBinding.getAnnotationTagBits();
if ((metaTagBits & TagBits.AnnotationRetentionMASK) == 0)
return true;... | private boolean isRuntimeInvisible(Annotation annotation) {
final TypeBinding annotationBinding = annotation.resolvedType;
if (annotationBinding == null) {
return false;
}
long metaTagBits = annotationBinding.getAnnotationTagBits(); // could be forward reference
if ((metaTagBits & TagBits.AnnotationRetent... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.