repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/editor/core/VdmEditor.java
VdmEditor.computeHighlightRangeSourceReference
protected INode computeHighlightRangeSourceReference() { ISourceViewer sourceViewer = getSourceViewer(); if (sourceViewer == null) return null; StyledText styledText = sourceViewer.getTextWidget(); if (styledText == null) return null; int caret = 0; if (sourceViewer instanceof ITextViewerExtension5)...
java
protected INode computeHighlightRangeSourceReference() { ISourceViewer sourceViewer = getSourceViewer(); if (sourceViewer == null) return null; StyledText styledText = sourceViewer.getTextWidget(); if (styledText == null) return null; int caret = 0; if (sourceViewer instanceof ITextViewerExtension5)...
[ "protected", "INode", "computeHighlightRangeSourceReference", "(", ")", "{", "ISourceViewer", "sourceViewer", "=", "getSourceViewer", "(", ")", ";", "if", "(", "sourceViewer", "==", "null", ")", "return", "null", ";", "StyledText", "styledText", "=", "sourceViewer",...
Computes and returns the source reference that includes the caret and serves as provider for the outline page selection and the editor range indication. @return the computed source reference @since 3.0
[ "Computes", "and", "returns", "the", "source", "reference", "that", "includes", "the", "caret", "and", "serves", "as", "provider", "for", "the", "outline", "page", "selection", "and", "the", "editor", "range", "indication", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/editor/core/VdmEditor.java#L783-L824
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/util/Delegate.java
Delegate.writeObject
private void writeObject(java.io.ObjectOutputStream out) throws IOException { if (delegateMethods != null) { delegateMethods.clear(); } out.defaultWriteObject(); }
java
private void writeObject(java.io.ObjectOutputStream out) throws IOException { if (delegateMethods != null) { delegateMethods.clear(); } out.defaultWriteObject(); }
[ "private", "void", "writeObject", "(", "java", ".", "io", ".", "ObjectOutputStream", "out", ")", "throws", "IOException", "{", "if", "(", "delegateMethods", "!=", "null", ")", "{", "delegateMethods", ".", "clear", "(", ")", ";", "}", "out", ".", "defaultWr...
The Method objects in the delegateMethods map cannot be serialized, which means that deep copies fail. So here, we clear the map when serialization occurs. The map is re-build later on demand.
[ "The", "Method", "objects", "in", "the", "delegateMethods", "map", "cannot", "be", "serialized", "which", "means", "that", "deep", "copies", "fail", ".", "So", "here", "we", "clear", "the", "map", "when", "serialization", "occurs", ".", "The", "map", "is", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/util/Delegate.java#L367-L375
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/outline/MemberFilterActionGroup.java
MemberFilterActionGroup.saveState
public void saveState(IMemento memento) { memento.putString(TAG_HIDEFIELDS, String.valueOf(hasMemberFilter(FILTER_FIELDS))); memento.putString(TAG_HIDESTATIC, String.valueOf(hasMemberFilter(FILTER_STATIC))); memento.putString(TAG_HIDENONPUBLIC, String.valueOf(hasMemberFilter(FILTER_NONPUBLIC))); memento.putStri...
java
public void saveState(IMemento memento) { memento.putString(TAG_HIDEFIELDS, String.valueOf(hasMemberFilter(FILTER_FIELDS))); memento.putString(TAG_HIDESTATIC, String.valueOf(hasMemberFilter(FILTER_STATIC))); memento.putString(TAG_HIDENONPUBLIC, String.valueOf(hasMemberFilter(FILTER_NONPUBLIC))); memento.putStri...
[ "public", "void", "saveState", "(", "IMemento", "memento", ")", "{", "memento", ".", "putString", "(", "TAG_HIDEFIELDS", ",", "String", ".", "valueOf", "(", "hasMemberFilter", "(", "FILTER_FIELDS", ")", ")", ")", ";", "memento", ".", "putString", "(", "TAG_H...
Saves the state of the filter actions in a memento. @param memento the memento to which the state is saved
[ "Saves", "the", "state", "of", "the", "filter", "actions", "in", "a", "memento", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/outline/MemberFilterActionGroup.java#L263-L268
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/outline/MemberFilterActionGroup.java
MemberFilterActionGroup.contributeToToolBar
public void contributeToToolBar(IToolBarManager tbm) { if (fInViewMenu) return; for (int i= 0; i < fFilterActions.length; i++) { tbm.add(fFilterActions[i]); } }
java
public void contributeToToolBar(IToolBarManager tbm) { if (fInViewMenu) return; for (int i= 0; i < fFilterActions.length; i++) { tbm.add(fFilterActions[i]); } }
[ "public", "void", "contributeToToolBar", "(", "IToolBarManager", "tbm", ")", "{", "if", "(", "fInViewMenu", ")", "return", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fFilterActions", ".", "length", ";", "i", "++", ")", "{", "tbm", ".", "a...
Adds the filter actions to the given tool bar @param tbm the tool bar to which the actions are added
[ "Adds", "the", "filter", "actions", "to", "the", "given", "tool", "bar" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/outline/MemberFilterActionGroup.java#L300-L306
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/outline/MemberFilterActionGroup.java
MemberFilterActionGroup.contributeToViewMenu
public void contributeToViewMenu(IMenuManager menu) { if (!fInViewMenu) return; final String filters= "filters"; //$NON-NLS-1$ if (menu.find(filters) != null) { for (int i= 0; i < fFilterActions.length; i++) { menu.prependToGroup(filters, fFilterActions[i]); } } else { for (int i= 0; i < fFilter...
java
public void contributeToViewMenu(IMenuManager menu) { if (!fInViewMenu) return; final String filters= "filters"; //$NON-NLS-1$ if (menu.find(filters) != null) { for (int i= 0; i < fFilterActions.length; i++) { menu.prependToGroup(filters, fFilterActions[i]); } } else { for (int i= 0; i < fFilter...
[ "public", "void", "contributeToViewMenu", "(", "IMenuManager", "menu", ")", "{", "if", "(", "!", "fInViewMenu", ")", "return", ";", "final", "String", "filters", "=", "\"filters\"", ";", "//$NON-NLS-1$", "if", "(", "menu", ".", "find", "(", "filters", ")", ...
Adds the filter actions to the given menu manager. @param menu the menu manager to which the actions are added @since 2.1
[ "Adds", "the", "filter", "actions", "to", "the", "given", "menu", "manager", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/outline/MemberFilterActionGroup.java#L314-L327
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/VdmProblemsLabelDecorator.java
VdmProblemsLabelDecorator.computeAdornmentFlags
protected int computeAdornmentFlags(Object obj) { // try // { if (obj instanceof IVdmElement) { IVdmElement element = (IVdmElement) obj; int type = element.getElementType(); switch (type) { case IVdmElement.VDM_MODEL: case IVdmElement.VDM_PROJECT: // case IVdmElement.PACKAGE_FRAGME...
java
protected int computeAdornmentFlags(Object obj) { // try // { if (obj instanceof IVdmElement) { IVdmElement element = (IVdmElement) obj; int type = element.getElementType(); switch (type) { case IVdmElement.VDM_MODEL: case IVdmElement.VDM_PROJECT: // case IVdmElement.PACKAGE_FRAGME...
[ "protected", "int", "computeAdornmentFlags", "(", "Object", "obj", ")", "{", "//\t\ttry", "//\t\t{", "if", "(", "obj", "instanceof", "IVdmElement", ")", "{", "IVdmElement", "element", "=", "(", "IVdmElement", ")", "obj", ";", "int", "type", "=", "element", "...
Computes the adornment flags for the given element. @param obj the element to compute the flags for @return the adornment flags
[ "Computes", "the", "adornment", "flags", "for", "the", "given", "element", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/VdmProblemsLabelDecorator.java#L181-L251
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/ImageDescriptorRegistry.java
ImageDescriptorRegistry.get
public Image get(ImageDescriptor descriptor) { if (descriptor == null) descriptor= ImageDescriptor.getMissingImageDescriptor(); Image result= (Image)fRegistry.get(descriptor); if (result != null) return result; Assert.isTrue(fDisplay == SWTUtil.getStandardDisplay(), "Allocating image for wrong display."...
java
public Image get(ImageDescriptor descriptor) { if (descriptor == null) descriptor= ImageDescriptor.getMissingImageDescriptor(); Image result= (Image)fRegistry.get(descriptor); if (result != null) return result; Assert.isTrue(fDisplay == SWTUtil.getStandardDisplay(), "Allocating image for wrong display."...
[ "public", "Image", "get", "(", "ImageDescriptor", "descriptor", ")", "{", "if", "(", "descriptor", "==", "null", ")", "descriptor", "=", "ImageDescriptor", ".", "getMissingImageDescriptor", "(", ")", ";", "Image", "result", "=", "(", "Image", ")", "fRegistry",...
Returns the image associated with the given image descriptor. @param descriptor the image descriptor for which the registry manages an image, or <code>null</code> for a missing image descriptor @return the image associated with the image descriptor or <code>null</code> if the image descriptor can't create the requeste...
[ "Returns", "the", "image", "associated", "with", "the", "given", "image", "descriptor", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/ImageDescriptorRegistry.java#L66-L79
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/ImageDescriptorRegistry.java
ImageDescriptorRegistry.dispose
public void dispose() { for (Iterator<Image> iter= fRegistry.values().iterator(); iter.hasNext(); ) { Image image= (Image)iter.next(); image.dispose(); } fRegistry.clear(); }
java
public void dispose() { for (Iterator<Image> iter= fRegistry.values().iterator(); iter.hasNext(); ) { Image image= (Image)iter.next(); image.dispose(); } fRegistry.clear(); }
[ "public", "void", "dispose", "(", ")", "{", "for", "(", "Iterator", "<", "Image", ">", "iter", "=", "fRegistry", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "iter", ".", "hasNext", "(", ")", ";", ")", "{", "Image", "image", "=", "(",...
Disposes all images managed by this registry.
[ "Disposes", "all", "images", "managed", "by", "this", "registry", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/ImageDescriptorRegistry.java#L84-L90
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/lex/LexLocationUtils.java
LexLocationUtils.addAstNode
public static void addAstNode(LexLocation location, INode node) { synchronized (locationToAstNode) { locationToAstNode.put(location, node); } }
java
public static void addAstNode(LexLocation location, INode node) { synchronized (locationToAstNode) { locationToAstNode.put(location, node); } }
[ "public", "static", "void", "addAstNode", "(", "LexLocation", "location", ",", "INode", "node", ")", "{", "synchronized", "(", "locationToAstNode", ")", "{", "locationToAstNode", ".", "put", "(", "location", ",", "node", ")", ";", "}", "}" ]
FIXME we know this is never called a new solutions is needed
[ "FIXME", "we", "know", "this", "is", "never", "called", "a", "new", "solutions", "is", "needed" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/lex/LexLocationUtils.java#L389-L395
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/lex/CoverageUtil.java
CoverageUtil.removeDuplicates
private static List<ILexLocation> removeDuplicates(List<ILexLocation> locations) { // Map merging function BinaryOperator<Vector<ILexLocation>> merge = (old, latest)-> { for (ILexLocation location : latest) { if (location.getHits() > 0) { // Remove objects with 0 hits in the equi...
java
private static List<ILexLocation> removeDuplicates(List<ILexLocation> locations) { // Map merging function BinaryOperator<Vector<ILexLocation>> merge = (old, latest)-> { for (ILexLocation location : latest) { if (location.getHits() > 0) { // Remove objects with 0 hits in the equi...
[ "private", "static", "List", "<", "ILexLocation", ">", "removeDuplicates", "(", "List", "<", "ILexLocation", ">", "locations", ")", "{", "// Map merging function", "BinaryOperator", "<", "Vector", "<", "ILexLocation", ">>", "merge", "=", "(", "old", ",", "latest...
This method handles the case where a location exist both with hits>0 and hits==0. It will remove the location with hits==0 when another location hits>0 exists. The strategy is to build a map with the elements of ILexLocation that are used when test equality as keys and the list of objects on the equivalence class as ...
[ "This", "method", "handles", "the", "case", "where", "a", "location", "exist", "both", "with", "hits", ">", "0", "and", "hits", "==", "0", ".", "It", "will", "remove", "the", "location", "with", "hits", "==", "0", "when", "another", "location", "hits", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/lex/CoverageUtil.java#L244-L296
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/Environment.java
Environment.dupHideCheck
protected void dupHideCheck(List<PDefinition> list, NameScope scope) { LexNameList allnames = af.createPDefinitionListAssistant().getVariableNames(list); for (ILexNameToken n1 : allnames) { LexNameList done = new LexNameList(); for (ILexNameToken n2 : allnames) { if (n1 != n2 && n1.equals(n2) && !...
java
protected void dupHideCheck(List<PDefinition> list, NameScope scope) { LexNameList allnames = af.createPDefinitionListAssistant().getVariableNames(list); for (ILexNameToken n1 : allnames) { LexNameList done = new LexNameList(); for (ILexNameToken n2 : allnames) { if (n1 != n2 && n1.equals(n2) && !...
[ "protected", "void", "dupHideCheck", "(", "List", "<", "PDefinition", ">", "list", ",", "NameScope", "scope", ")", "{", "LexNameList", "allnames", "=", "af", ".", "createPDefinitionListAssistant", "(", ")", ".", "getVariableNames", "(", "list", ")", ";", "for"...
Check whether the list of definitions passed contains any duplicates, or whether any names in the list hide the same name further down the environment chain. @param list The list of definitions to check.
[ "Check", "whether", "the", "list", "of", "definitions", "passed", "contains", "any", "duplicates", "or", "whether", "any", "names", "in", "the", "list", "hide", "the", "same", "name", "further", "down", "the", "environment", "chain", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/Environment.java#L82-L135
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/Environment.java
Environment.unusedCheck
public void unusedCheck(Environment downTo) { Environment p = this; while (p != null && p != downTo) { p.unusedCheck(); p = p.outer; } }
java
public void unusedCheck(Environment downTo) { Environment p = this; while (p != null && p != downTo) { p.unusedCheck(); p = p.outer; } }
[ "public", "void", "unusedCheck", "(", "Environment", "downTo", ")", "{", "Environment", "p", "=", "this", ";", "while", "(", "p", "!=", "null", "&&", "p", "!=", "downTo", ")", "{", "p", ".", "unusedCheck", "(", ")", ";", "p", "=", "p", ".", "outer"...
Unravelling unused check. @param downTo
[ "Unravelling", "unused", "check", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/Environment.java#L258-L267
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/ModuleInterpreter.java
ModuleInterpreter.setDefaultName
@Override public void setDefaultName(String mname) throws Exception { if (mname == null) { defaultModule = AstFactory.newAModuleModules(); } else { for (AModuleModules m : modules) { if (m.getName().getName().equals(mname)) { defaultModule = m; return; } } throw new Excep...
java
@Override public void setDefaultName(String mname) throws Exception { if (mname == null) { defaultModule = AstFactory.newAModuleModules(); } else { for (AModuleModules m : modules) { if (m.getName().getName().equals(mname)) { defaultModule = m; return; } } throw new Excep...
[ "@", "Override", "public", "void", "setDefaultName", "(", "String", "mname", ")", "throws", "Exception", "{", "if", "(", "mname", "==", "null", ")", "{", "defaultModule", "=", "AstFactory", ".", "newAModuleModules", "(", ")", ";", "}", "else", "{", "for", ...
Set the default module to the name given. @param mname The name of the new default module. @throws Exception The module name is not known.
[ "Set", "the", "default", "module", "to", "the", "name", "given", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/ModuleInterpreter.java#L132-L151
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/values/ObjectValue.java
ObjectValue.setCreator
private synchronized void setCreator(ObjectValue newCreator) { // Do not set the creator if created by the system class. The System contains // fields with references to Thread instances which are not Serializable and // will fail a deep copy with a NotSerializableExpection for Thread if (newCreator != null ...
java
private synchronized void setCreator(ObjectValue newCreator) { // Do not set the creator if created by the system class. The System contains // fields with references to Thread instances which are not Serializable and // will fail a deep copy with a NotSerializableExpection for Thread if (newCreator != null ...
[ "private", "synchronized", "void", "setCreator", "(", "ObjectValue", "newCreator", ")", "{", "// Do not set the creator if created by the system class. The System contains", "// fields with references to Thread instances which are not Serializable and", "// will fail a deep copy with a NotSeri...
Sets the creator of this object value and adds this to the newCreator parsed as argument @param newCreator The creator of this object value
[ "Sets", "the", "creator", "of", "this", "object", "value", "and", "adds", "this", "to", "the", "newCreator", "parsed", "as", "argument" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/values/ObjectValue.java#L585-L597
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/values/Value.java
Value.formatTo
public void formatTo(Formatter formatter, int flags, int width, int precision) { formatTo(this.toString(), formatter, flags, width, precision); }
java
public void formatTo(Formatter formatter, int flags, int width, int precision) { formatTo(this.toString(), formatter, flags, width, precision); }
[ "public", "void", "formatTo", "(", "Formatter", "formatter", ",", "int", "flags", ",", "int", "width", ",", "int", "precision", ")", "{", "formatTo", "(", "this", ".", "toString", "(", ")", ",", "formatter", ",", "flags", ",", "width", ",", "precision", ...
This is overridden in the few classes that need to change formatting
[ "This", "is", "overridden", "in", "the", "few", "classes", "that", "need", "to", "change", "formatting" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/values/Value.java#L60-L64
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/messages/rtlog/RTLogger.java
RTLogger.enable
public static synchronized void enable(boolean on) { for (IRTLogger logger : loggers) { logger.enable(on); } enabled = on; }
java
public static synchronized void enable(boolean on) { for (IRTLogger logger : loggers) { logger.enable(on); } enabled = on; }
[ "public", "static", "synchronized", "void", "enable", "(", "boolean", "on", ")", "{", "for", "(", "IRTLogger", "logger", ":", "loggers", ")", "{", "logger", ".", "enable", "(", "on", ")", ";", "}", "enabled", "=", "on", ";", "}" ]
Turns the logging on or off @param on
[ "Turns", "the", "logging", "on", "or", "off" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/messages/rtlog/RTLogger.java#L57-L65
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/messages/rtlog/RTLogger.java
RTLogger.setLogfile
public static void setLogfile(Class<? extends IRTLogger> loggerClass, File outputFile) throws FileNotFoundException { for (IRTLogger logger : loggers) { if (logger.getClass() == loggerClass) { logger.setLogfile(outputFile); logger.dump(true); // Write out and close previous } } enable(true...
java
public static void setLogfile(Class<? extends IRTLogger> loggerClass, File outputFile) throws FileNotFoundException { for (IRTLogger logger : loggers) { if (logger.getClass() == loggerClass) { logger.setLogfile(outputFile); logger.dump(true); // Write out and close previous } } enable(true...
[ "public", "static", "void", "setLogfile", "(", "Class", "<", "?", "extends", "IRTLogger", ">", "loggerClass", ",", "File", "outputFile", ")", "throws", "FileNotFoundException", "{", "for", "(", "IRTLogger", "logger", ":", "loggers", ")", "{", "if", "(", "log...
Configure the logger output types @param loggerClass the logger class @param outputFile the output file @throws FileNotFoundException
[ "Configure", "the", "logger", "output", "types" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/messages/rtlog/RTLogger.java#L94-L107
train
overturetool/overture
ide/core/src/main/java/org/overture/ide/core/parser/SourceParserManager.java
SourceParserManager.getSourceParser
public ISourceParser getSourceParser(IVdmProject project) throws CoreException { IConfigurationElement[] config = Platform .getExtensionRegistry() .getConfigurationElementsFor(ICoreConstants.EXTENSION_PARSER_ID); IConfigurationElement selectedParser = getParserWithHeighestPriority( project.getVdmNa...
java
public ISourceParser getSourceParser(IVdmProject project) throws CoreException { IConfigurationElement[] config = Platform .getExtensionRegistry() .getConfigurationElementsFor(ICoreConstants.EXTENSION_PARSER_ID); IConfigurationElement selectedParser = getParserWithHeighestPriority( project.getVdmNa...
[ "public", "ISourceParser", "getSourceParser", "(", "IVdmProject", "project", ")", "throws", "CoreException", "{", "IConfigurationElement", "[", "]", "config", "=", "Platform", ".", "getExtensionRegistry", "(", ")", ".", "getConfigurationElementsFor", "(", "ICoreConstant...
Loads a source parser for the given project @param project the project to load the source parser for @return a valid source parser for the current project based on the highest priority parser available from the nature, or null if no parser could be found @throws CoreException
[ "Loads", "a", "source", "parser", "for", "the", "given", "project" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/core/src/main/java/org/overture/ide/core/parser/SourceParserManager.java#L70-L96
train
overturetool/overture
ide/core/src/main/java/org/overture/ide/core/parser/SourceParserManager.java
SourceParserManager.getParserWithHeighestPriority
private IConfigurationElement getParserWithHeighestPriority( String natureId, IConfigurationElement[] config) { IConfigurationElement selectedParser = null; int selectedParserPriority = 0; for (IConfigurationElement e : config) { if (e.getAttribute("nature").equals(natureId)) { if (selectedParser ...
java
private IConfigurationElement getParserWithHeighestPriority( String natureId, IConfigurationElement[] config) { IConfigurationElement selectedParser = null; int selectedParserPriority = 0; for (IConfigurationElement e : config) { if (e.getAttribute("nature").equals(natureId)) { if (selectedParser ...
[ "private", "IConfigurationElement", "getParserWithHeighestPriority", "(", "String", "natureId", ",", "IConfigurationElement", "[", "]", "config", ")", "{", "IConfigurationElement", "selectedParser", "=", "null", ";", "int", "selectedParserPriority", "=", "0", ";", "for"...
Gets the parser available for the given nature having the highest priority @param natureId the nature to lookup a parser for @param config the configuration of the extension point @return a valid source parser or null
[ "Gets", "the", "parser", "available", "for", "the", "given", "nature", "having", "the", "highest", "priority" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/core/src/main/java/org/overture/ide/core/parser/SourceParserManager.java#L108-L143
train
overturetool/overture
ide/core/src/main/java/org/overture/ide/core/parser/SourceParserManager.java
SourceParserManager.parseFile
public static void parseFile(final IVdmSourceUnit source) throws CoreException, IOException { try { ISourceParser parser = SourceParserManager.getInstance() .getSourceParser(source.getProject()); Assert.isNotNull(parser, "No parser for file : " + source.toString() + " in project " + source....
java
public static void parseFile(final IVdmSourceUnit source) throws CoreException, IOException { try { ISourceParser parser = SourceParserManager.getInstance() .getSourceParser(source.getProject()); Assert.isNotNull(parser, "No parser for file : " + source.toString() + " in project " + source....
[ "public", "static", "void", "parseFile", "(", "final", "IVdmSourceUnit", "source", ")", "throws", "CoreException", ",", "IOException", "{", "try", "{", "ISourceParser", "parser", "=", "SourceParserManager", ".", "getInstance", "(", ")", ".", "getSourceParser", "("...
Parse a single file from a project @param source the file to be parsed @throws CoreException @throws IOException
[ "Parse", "a", "single", "file", "from", "a", "project" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/core/src/main/java/org/overture/ide/core/parser/SourceParserManager.java#L199-L218
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/VdmDebugPlugin.java
VdmDebugPlugin.getDbgpService
public synchronized IDbgpService getDbgpService(int freePort) { // if (dbgpService == null) { dbgpService = new DbgpService(freePort); getPluginPreferences().addPropertyChangeListener(new DbgpServicePreferenceUpdater()); // } return dbgpService; }
java
public synchronized IDbgpService getDbgpService(int freePort) { // if (dbgpService == null) { dbgpService = new DbgpService(freePort); getPluginPreferences().addPropertyChangeListener(new DbgpServicePreferenceUpdater()); // } return dbgpService; }
[ "public", "synchronized", "IDbgpService", "getDbgpService", "(", "int", "freePort", ")", "{", "// if (dbgpService == null) {", "dbgpService", "=", "new", "DbgpService", "(", "freePort", ")", ";", "getPluginPreferences", "(", ")", ".", "addPropertyChangeListener", "(", ...
Inefficient use getDbgpService @param freePort @return
[ "Inefficient", "use", "getDbgpService" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/VdmDebugPlugin.java#L133-L144
train
overturetool/overture
core/ast/src/main/java/org/overture/util/Base64.java
Base64.b64decode
private static int b64decode(char c) { int i = c; if (i >= 'A' && i <= 'Z') { return i - 'A'; } if (i >= 'a' && i <= 'z') { return i - 'a' + 26; } if (i >= '0' && i <= '9') { return i - '0' + 52; } if (i == '+') { return 62; } if (i == '/') { return 63; } return -...
java
private static int b64decode(char c) { int i = c; if (i >= 'A' && i <= 'Z') { return i - 'A'; } if (i >= 'a' && i <= 'z') { return i - 'a' + 26; } if (i >= '0' && i <= '9') { return i - '0' + 52; } if (i == '+') { return 62; } if (i == '/') { return 63; } return -...
[ "private", "static", "int", "b64decode", "(", "char", "c", ")", "{", "int", "i", "=", "c", ";", "if", "(", "i", ">=", "'", "'", "&&", "i", "<=", "'", "'", ")", "{", "return", "i", "-", "'", "'", ";", "}", "if", "(", "i", ">=", "'", "'", ...
Return the 6-bit value corresponding to a base64 encoded char. If the character is the base64 padding character, '=', -1 is returned. @param c The character to decode @return The decoded 6-bit value, or -1 for padding.
[ "Return", "the", "6", "-", "bit", "value", "corresponding", "to", "a", "base64", "encoded", "char", ".", "If", "the", "character", "is", "the", "base64", "padding", "character", "=", "-", "1", "is", "returned", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/util/Base64.java#L47-L77
train
overturetool/overture
core/ast/src/main/java/org/overture/util/Base64.java
Base64.b64encode
private static char b64encode(int b) { if (b >= 0 && b <= 25) { return (char) ('A' + b); } if (b >= 26 && b <= 51) { return (char) ('a' + b - 26); } if (b >= 52 && b <= 61) { return (char) ('0' + b - 52); } if (b == 62) { return '+'; } if (b == 63) { return '/'; } re...
java
private static char b64encode(int b) { if (b >= 0 && b <= 25) { return (char) ('A' + b); } if (b >= 26 && b <= 51) { return (char) ('a' + b - 26); } if (b >= 52 && b <= 61) { return (char) ('0' + b - 52); } if (b == 62) { return '+'; } if (b == 63) { return '/'; } re...
[ "private", "static", "char", "b64encode", "(", "int", "b", ")", "{", "if", "(", "b", ">=", "0", "&&", "b", "<=", "25", ")", "{", "return", "(", "char", ")", "(", "'", "'", "+", "b", ")", ";", "}", "if", "(", "b", ">=", "26", "&&", "b", "<...
Encode a 6-bit quantity as a base64 character. @param b The 6-bit quantity. return The character.
[ "Encode", "a", "6", "-", "bit", "quantity", "as", "a", "base64", "character", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/util/Base64.java#L86-L114
train
overturetool/overture
core/ast/src/main/java/org/overture/util/Base64.java
Base64.decode
public static byte[] decode(String text) throws Exception { if (text.length() % 4 != 0) { throw new Exception("Base64 not a multiple of 4 bytes"); } byte[] result = new byte[text.length() / 4 * 3]; int p = 0; for (int i = 0; i < text.length();) { if (text.charAt(i) == '\n') { continue; ...
java
public static byte[] decode(String text) throws Exception { if (text.length() % 4 != 0) { throw new Exception("Base64 not a multiple of 4 bytes"); } byte[] result = new byte[text.length() / 4 * 3]; int p = 0; for (int i = 0; i < text.length();) { if (text.charAt(i) == '\n') { continue; ...
[ "public", "static", "byte", "[", "]", "decode", "(", "String", "text", ")", "throws", "Exception", "{", "if", "(", "text", ".", "length", "(", ")", "%", "4", "!=", "0", ")", "{", "throw", "new", "Exception", "(", "\"Base64 not a multiple of 4 bytes\"", "...
Base64 decode a string into a byte array. @param text The encoded base64 text. @return a byte array of the decoded data. @throws Exception
[ "Base64", "decode", "a", "string", "into", "a", "byte", "array", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/util/Base64.java#L125-L169
train
overturetool/overture
core/ast/src/main/java/org/overture/util/Base64.java
Base64.encode
public static StringBuffer encode(byte[] data) { int rem = data.length % 3; int num = data.length / 3; StringBuffer result = new StringBuffer(); int p = 0; // int c=0; for (int i = 0; i < num; i++) { int b1 = (data[p] & 0xfc) >> 2; int b2 = (data[p] & 0x03) << 4 | (data[p + 1] & 0xf0) >> 4; int...
java
public static StringBuffer encode(byte[] data) { int rem = data.length % 3; int num = data.length / 3; StringBuffer result = new StringBuffer(); int p = 0; // int c=0; for (int i = 0; i < num; i++) { int b1 = (data[p] & 0xfc) >> 2; int b2 = (data[p] & 0x03) << 4 | (data[p + 1] & 0xf0) >> 4; int...
[ "public", "static", "StringBuffer", "encode", "(", "byte", "[", "]", "data", ")", "{", "int", "rem", "=", "data", ".", "length", "%", "3", ";", "int", "num", "=", "data", ".", "length", "/", "3", ";", "StringBuffer", "result", "=", "new", "StringBuff...
Base64 encode a byte array. @param data the data to encode. @return a StringBuffer containing the encoded lines.
[ "Base64", "encode", "a", "byte", "array", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/util/Base64.java#L179-L235
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/scheduler/CPUResource.java
CPUResource.reschedule
@Override public boolean reschedule() { if (swappedIn != null && swappedIn.getRunState() == RunState.TIMESTEP) { return false; // Can't schedule anything else and we're idle. } if (policy.reschedule()) { ISchedulableThread best = policy.getThread(); if (swappedIn != best) { if (swappedIn !...
java
@Override public boolean reschedule() { if (swappedIn != null && swappedIn.getRunState() == RunState.TIMESTEP) { return false; // Can't schedule anything else and we're idle. } if (policy.reschedule()) { ISchedulableThread best = policy.getThread(); if (swappedIn != best) { if (swappedIn !...
[ "@", "Override", "public", "boolean", "reschedule", "(", ")", "{", "if", "(", "swappedIn", "!=", "null", "&&", "swappedIn", ".", "getRunState", "(", ")", "==", "RunState", ".", "TIMESTEP", ")", "{", "return", "false", ";", "// Can't schedule anything else and ...
may be due to a time step, including a swap delay).
[ "may", "be", "due", "to", "a", "time", "step", "including", "a", "swap", "delay", ")", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/scheduler/CPUResource.java#L78-L131
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/eval/ExpressionEvaluator.java
ExpressionEvaluator.eval
public Value eval(ACaseAlternative node, Value val, Context ctxt) throws AnalysisException { Context evalContext = new Context(ctxt.assistantFactory, node.getLocation(), "case alternative", ctxt); try { evalContext.putList(ctxt.assistantFactory.createPPatternAssistant().getNamedValues(node.getPattern(), v...
java
public Value eval(ACaseAlternative node, Value val, Context ctxt) throws AnalysisException { Context evalContext = new Context(ctxt.assistantFactory, node.getLocation(), "case alternative", ctxt); try { evalContext.putList(ctxt.assistantFactory.createPPatternAssistant().getNamedValues(node.getPattern(), v...
[ "public", "Value", "eval", "(", "ACaseAlternative", "node", ",", "Value", "val", ",", "Context", "ctxt", ")", "throws", "AnalysisException", "{", "Context", "evalContext", "=", "new", "Context", "(", "ctxt", ".", "assistantFactory", ",", "node", ".", "getLocat...
Utility method for ACaseAlternative @param node @param val @param ctxt @return @throws AnalysisException
[ "Utility", "method", "for", "ACaseAlternative" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/eval/ExpressionEvaluator.java#L254-L269
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/eval/ExpressionEvaluator.java
ExpressionEvaluator.evalIf
protected Value evalIf(INode node, ILexLocation ifLocation, PExp testExp, INode thenNode, List<? extends INode> elseIfNodeList, INode elseNode, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(ifLocation, ctxt); try { if (testExp.apply(VdmRuntime.getStatementEvaluato...
java
protected Value evalIf(INode node, ILexLocation ifLocation, PExp testExp, INode thenNode, List<? extends INode> elseIfNodeList, INode elseNode, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(ifLocation, ctxt); try { if (testExp.apply(VdmRuntime.getStatementEvaluato...
[ "protected", "Value", "evalIf", "(", "INode", "node", ",", "ILexLocation", "ifLocation", ",", "PExp", "testExp", ",", "INode", "thenNode", ",", "List", "<", "?", "extends", "INode", ">", "elseIfNodeList", ",", "INode", "elseNode", ",", "Context", "ctxt", ")"...
Utility method to evaluate both if expressions and statements @param node @param ifLocation @param testExp @param thenNode @param elseIfNodeList @param elseNode @param ctxt @return @throws AnalysisException
[ "Utility", "method", "to", "evaluate", "both", "if", "expressions", "and", "statements" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/eval/ExpressionEvaluator.java#L693-L726
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/eval/ExpressionEvaluator.java
ExpressionEvaluator.evalElseIf
protected Value evalElseIf(INode node, ILexLocation location, PExp test, INode then, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(location, ctxt); try { return test.apply(VdmRuntime.getExpressionEvaluator(), ctxt).boolValue(ctxt) ? then.apply(THIS, ctxt) : null...
java
protected Value evalElseIf(INode node, ILexLocation location, PExp test, INode then, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(location, ctxt); try { return test.apply(VdmRuntime.getExpressionEvaluator(), ctxt).boolValue(ctxt) ? then.apply(THIS, ctxt) : null...
[ "protected", "Value", "evalElseIf", "(", "INode", "node", ",", "ILexLocation", "location", ",", "PExp", "test", ",", "INode", "then", ",", "Context", "ctxt", ")", "throws", "AnalysisException", "{", "BreakpointManager", ".", "getBreakpoint", "(", "node", ")", ...
Utility method to evaluate elseif nodes @param node @param location @param test @param then @param ctxt @return @throws AnalysisException
[ "Utility", "method", "to", "evaluate", "elseif", "nodes" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/eval/ExpressionEvaluator.java#L739-L752
train
overturetool/overture
core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/Sentinel.java
Sentinel.init
public void init(EvaluatePP inst, long nrf) { instance = inst; act = new long[(int) nrf]; fin = new long[(int) nrf]; req = new long[(int) nrf]; active = new long[(int) nrf]; waiting = new long[(int) nrf]; }
java
public void init(EvaluatePP inst, long nrf) { instance = inst; act = new long[(int) nrf]; fin = new long[(int) nrf]; req = new long[(int) nrf]; active = new long[(int) nrf]; waiting = new long[(int) nrf]; }
[ "public", "void", "init", "(", "EvaluatePP", "inst", ",", "long", "nrf", ")", "{", "instance", "=", "inst", ";", "act", "=", "new", "long", "[", "(", "int", ")", "nrf", "]", ";", "fin", "=", "new", "long", "[", "(", "int", ")", "nrf", "]", ";",...
and the number of methods to define the size of the arrays.
[ "and", "the", "number", "of", "methods", "to", "define", "the", "size", "of", "the", "arrays", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/Sentinel.java#L22-L30
train
overturetool/overture
core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/Sentinel.java
Sentinel.entering
public synchronized void entering(long fnr2) { int fnr = (int) fnr2; // Here the long value is casted into in to be used as index to the arrays. requesting(fnr);// the #req counter is changed to add one to it. try { if (!instance.evaluatePP(fnr).booleanValue()) // the first evaluation of the permition predi...
java
public synchronized void entering(long fnr2) { int fnr = (int) fnr2; // Here the long value is casted into in to be used as index to the arrays. requesting(fnr);// the #req counter is changed to add one to it. try { if (!instance.evaluatePP(fnr).booleanValue()) // the first evaluation of the permition predi...
[ "public", "synchronized", "void", "entering", "(", "long", "fnr2", ")", "{", "int", "fnr", "=", "(", "int", ")", "fnr2", ";", "// Here the long value is casted into in to be used as index to the arrays.", "requesting", "(", "fnr", ")", ";", "// the #req counter is chang...
This methods is used to enable the activation of a method.
[ "This", "methods", "is", "used", "to", "enable", "the", "activation", "of", "a", "method", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/Sentinel.java#L33-L53
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/wizard/pages/WizardProjectsImportPageProxy.java
WizardProjectsImportPageProxy.createPageControlsPostconfig
public void createPageControlsPostconfig() { try { getMainPageButton("projectFromArchiveRadio").setSelection(true); getMainPageButton("projectFromArchiveRadio").setEnabled(false); getMainPageButton("projectFromDirectoryRadio").setSelection(false); getMainPageButton("projectFromDirectoryRadio").setEnabled(...
java
public void createPageControlsPostconfig() { try { getMainPageButton("projectFromArchiveRadio").setSelection(true); getMainPageButton("projectFromArchiveRadio").setEnabled(false); getMainPageButton("projectFromDirectoryRadio").setSelection(false); getMainPageButton("projectFromDirectoryRadio").setEnabled(...
[ "public", "void", "createPageControlsPostconfig", "(", ")", "{", "try", "{", "getMainPageButton", "(", "\"projectFromArchiveRadio\"", ")", ".", "setSelection", "(", "true", ")", ";", "getMainPageButton", "(", "\"projectFromArchiveRadio\"", ")", ".", "setEnabled", "(",...
This initializes the page with the graphical selection and sets the input path. The input path must be set prior to the call to this method
[ "This", "initializes", "the", "page", "with", "the", "graphical", "selection", "and", "sets", "the", "input", "path", ".", "The", "input", "path", "must", "be", "set", "prior", "to", "the", "call", "to", "this", "method" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/wizard/pages/WizardProjectsImportPageProxy.java#L106-L131
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/config/Properties.java
Properties.init
public static void init() { try { init("vdmj.properties", Properties.class); } catch (Exception e) { System.err.println(e.getMessage()); } InputStream fis = ConfigBase.class.getResourceAsStream("/" + "overture.properties"); if (fis != null) { try { java.util.Properties overturePro...
java
public static void init() { try { init("vdmj.properties", Properties.class); } catch (Exception e) { System.err.println(e.getMessage()); } InputStream fis = ConfigBase.class.getResourceAsStream("/" + "overture.properties"); if (fis != null) { try { java.util.Properties overturePro...
[ "public", "static", "void", "init", "(", ")", "{", "try", "{", "init", "(", "\"vdmj.properties\"", ",", "Properties", ".", "class", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "System", ".", "err", ".", "println", "(", "e", ".", "getMess...
When the class is initialized, we call the ConfigBase init method, which uses the properties file passed to update the static fields above.
[ "When", "the", "class", "is", "initialized", "we", "call", "the", "ConfigBase", "init", "method", "which", "uses", "the", "properties", "file", "passed", "to", "update", "the", "static", "fields", "above", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/config/Properties.java#L88-L132
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/traces/TraceStmBuilder.java
TraceStmBuilder.replaceArgsWithVars
protected List<AVarDeclIR> replaceArgsWithVars(SStmIR callStm) { List<AVarDeclIR> decls = new LinkedList<AVarDeclIR>(); if (Settings.dialect != Dialect.VDM_SL) { return decls; } List<SExpIR> args = null; if (callStm instanceof SCallStmIR) { args = ((SCallStmIR) callStm).getArgs(); } else if (c...
java
protected List<AVarDeclIR> replaceArgsWithVars(SStmIR callStm) { List<AVarDeclIR> decls = new LinkedList<AVarDeclIR>(); if (Settings.dialect != Dialect.VDM_SL) { return decls; } List<SExpIR> args = null; if (callStm instanceof SCallStmIR) { args = ((SCallStmIR) callStm).getArgs(); } else if (c...
[ "protected", "List", "<", "AVarDeclIR", ">", "replaceArgsWithVars", "(", "SStmIR", "callStm", ")", "{", "List", "<", "AVarDeclIR", ">", "decls", "=", "new", "LinkedList", "<", "AVarDeclIR", ">", "(", ")", ";", "if", "(", "Settings", ".", "dialect", "!=", ...
Assumes dialect is VDM-SL. This method does not work with store lookups for local variables and since code generated VDM-SL traces do not rely on this then it is safe to use this method for this dialect. @param callStm the call statement for which we want to replace the arguments with variables @return the variable de...
[ "Assumes", "dialect", "is", "VDM", "-", "SL", ".", "This", "method", "does", "not", "work", "with", "store", "lookups", "for", "local", "variables", "and", "since", "code", "generated", "VDM", "-", "SL", "traces", "do", "not", "rely", "on", "this", "then...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/traces/TraceStmBuilder.java#L358-L395
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/visitors/PogParamDefinitionVisitor.java
PogParamDefinitionVisitor.collectOpCtxt
protected void collectOpCtxt(AExplicitOperationDefinition node, IPOContextStack question, Boolean precond) throws AnalysisException { question.push(new POOperationDefinitionContext(node, precond, node.getState())); }
java
protected void collectOpCtxt(AExplicitOperationDefinition node, IPOContextStack question, Boolean precond) throws AnalysisException { question.push(new POOperationDefinitionContext(node, precond, node.getState())); }
[ "protected", "void", "collectOpCtxt", "(", "AExplicitOperationDefinition", "node", ",", "IPOContextStack", "question", ",", "Boolean", "precond", ")", "throws", "AnalysisException", "{", "question", ".", "push", "(", "new", "POOperationDefinitionContext", "(", "node", ...
Operation processing is identical in extension except for context generation. So, a quick trick here. @param node @param question @param precond @throws AnalysisException
[ "Operation", "processing", "is", "identical", "in", "extension", "except", "for", "context", "generation", ".", "So", "a", "quick", "trick", "here", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/visitors/PogParamDefinitionVisitor.java#L562-L566
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/assistant/definition/PDefinitionAssistantInterpreter.java
PDefinitionAssistantInterpreter.getValues
public ValueList getValues(PDefinition def, ObjectContext ctxt) { try { return def.apply(af.getValuesDefinitionLocator(), ctxt); } catch (AnalysisException e) { return null; } }
java
public ValueList getValues(PDefinition def, ObjectContext ctxt) { try { return def.apply(af.getValuesDefinitionLocator(), ctxt); } catch (AnalysisException e) { return null; } }
[ "public", "ValueList", "getValues", "(", "PDefinition", "def", ",", "ObjectContext", "ctxt", ")", "{", "try", "{", "return", "def", ".", "apply", "(", "af", ".", "getValuesDefinitionLocator", "(", ")", ",", "ctxt", ")", ";", "}", "catch", "(", "AnalysisExc...
Return a list of external values that are read by the definition. @param def @param ctxt The context in which to evaluate the expressions. @return A list of values read.
[ "Return", "a", "list", "of", "external", "values", "that", "are", "read", "by", "the", "definition", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/assistant/definition/PDefinitionAssistantInterpreter.java#L67-L77
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/ClassInterpreter.java
ClassInterpreter.execute
@Override public Value execute(String line, DBGPReader dbgp) throws Exception { PExp expr = parseExpression(line, getDefaultName()); Environment env = getGlobalEnvironment(); Environment created = new FlatCheckedEnvironment(assistantFactory, createdDefinitions.asList(), env, NameScope.NAMESANDSTATE); typeChe...
java
@Override public Value execute(String line, DBGPReader dbgp) throws Exception { PExp expr = parseExpression(line, getDefaultName()); Environment env = getGlobalEnvironment(); Environment created = new FlatCheckedEnvironment(assistantFactory, createdDefinitions.asList(), env, NameScope.NAMESANDSTATE); typeChe...
[ "@", "Override", "public", "Value", "execute", "(", "String", "line", ",", "DBGPReader", "dbgp", ")", "throws", "Exception", "{", "PExp", "expr", "=", "parseExpression", "(", "line", ",", "getDefaultName", "(", ")", ")", ";", "Environment", "env", "=", "ge...
Parse the line passed, type check it and evaluate it as an expression in the initial context. @param line A VDM expression. @return The value of the expression. @throws Exception Parser, type checking or runtime errors.
[ "Parse", "the", "line", "passed", "type", "check", "it", "and", "evaluate", "it", "as", "an", "expression", "in", "the", "initial", "context", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/ClassInterpreter.java#L282-L291
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/dbgp/internal/utils/Base64.java
Base64.decodeDigit
static int decodeDigit(byte data) { char charData = (char) data; if (charData <= 'Z' && charData >= 'A') { return charData - 'A'; } if (charData <= 'z' && charData >= 'a') { return charData - 'a' + 26; } if (charData <= '9' && charData >= '0') { return charData - '0' + 52; } switch (char...
java
static int decodeDigit(byte data) { char charData = (char) data; if (charData <= 'Z' && charData >= 'A') { return charData - 'A'; } if (charData <= 'z' && charData >= 'a') { return charData - 'a' + 26; } if (charData <= '9' && charData >= '0') { return charData - '0' + 52; } switch (char...
[ "static", "int", "decodeDigit", "(", "byte", "data", ")", "{", "char", "charData", "=", "(", "char", ")", "data", ";", "if", "(", "charData", "<=", "'", "'", "&&", "charData", ">=", "'", "'", ")", "{", "return", "charData", "-", "'", "'", ";", "}...
This method converts a Base 64 digit to its numeric value. @param data digit (character) to convert @return value for the digit
[ "This", "method", "converts", "a", "Base", "64", "digit", "to", "its", "numeric", "value", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/dbgp/internal/utils/Base64.java#L257-L281
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/commands/DebuggerReader.java
DebuggerReader.run
public ExitStatus run() { synchronized (DebuggerReader.class) // Only one console! { println("Stopped " + breakpoint); println(interpreter.getSourceLine(breakpoint.location)); try { interpreter.setDefaultName(breakpoint.location.getModule()); } catch (Exception e) { throw new InternalExc...
java
public ExitStatus run() { synchronized (DebuggerReader.class) // Only one console! { println("Stopped " + breakpoint); println(interpreter.getSourceLine(breakpoint.location)); try { interpreter.setDefaultName(breakpoint.location.getModule()); } catch (Exception e) { throw new InternalExc...
[ "public", "ExitStatus", "run", "(", ")", "{", "synchronized", "(", "DebuggerReader", ".", "class", ")", "// Only one console!", "{", "println", "(", "\"Stopped \"", "+", "breakpoint", ")", ";", "println", "(", "interpreter", ".", "getSourceLine", "(", "breakpoin...
This first prints out the current breakpoint source location before calling the superclass' run method. The synchronization prevents more than one debugging session on the console. @return the exit status
[ "This", "first", "prints", "out", "the", "current", "breakpoint", "source", "location", "before", "calling", "the", "superclass", "run", "method", ".", "The", "synchronization", "prevents", "more", "than", "one", "debugging", "session", "on", "the", "console", "...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/commands/DebuggerReader.java#L77-L96
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/commands/DebuggerReader.java
DebuggerReader.doEvaluate
@Override protected boolean doEvaluate(String line) { line = line.substring(line.indexOf(' ') + 1); try { println(line + " = " + interpreter.evaluate(line, getFrame())); } catch (ParserException e) { println("Syntax: " + e); } catch (ContextException e) { println("Runtime: " + e.getMessage());...
java
@Override protected boolean doEvaluate(String line) { line = line.substring(line.indexOf(' ') + 1); try { println(line + " = " + interpreter.evaluate(line, getFrame())); } catch (ParserException e) { println("Syntax: " + e); } catch (ContextException e) { println("Runtime: " + e.getMessage());...
[ "@", "Override", "protected", "boolean", "doEvaluate", "(", "String", "line", ")", "{", "line", "=", "line", ".", "substring", "(", "line", ".", "indexOf", "(", "'", "'", ")", "+", "1", ")", ";", "try", "{", "println", "(", "line", "+", "\" = \"", ...
Evaluate an expression in the breakpoint's context. This is similar to the superclass method, except that the context is the one taken from the breakpoint, and the execution is not timed. @see org.overture.interpreter.commands.CommandReader#doEvaluate(java.lang.String)
[ "Evaluate", "an", "expression", "in", "the", "breakpoint", "s", "context", ".", "This", "is", "similar", "to", "the", "superclass", "method", "except", "that", "the", "context", "is", "the", "one", "taken", "from", "the", "breakpoint", "and", "the", "executi...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/commands/DebuggerReader.java#L117-L140
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/assistant/definition/ACpuClassDefinitionAssistantInterpreter.java
ACpuClassDefinitionAssistantInterpreter.updateCPUandChildCPUs
private void updateCPUandChildCPUs(ObjectValue obj, CPUValue cpu) { if (cpu != obj.getCPU()) { for (ObjectValue superObj : obj.superobjects) { updateCPUandChildCPUs(superObj, cpu); } obj.setCPU(cpu); } // update all object we have created our self. for (ObjectValue objVal : obj.children) {...
java
private void updateCPUandChildCPUs(ObjectValue obj, CPUValue cpu) { if (cpu != obj.getCPU()) { for (ObjectValue superObj : obj.superobjects) { updateCPUandChildCPUs(superObj, cpu); } obj.setCPU(cpu); } // update all object we have created our self. for (ObjectValue objVal : obj.children) {...
[ "private", "void", "updateCPUandChildCPUs", "(", "ObjectValue", "obj", ",", "CPUValue", "cpu", ")", "{", "if", "(", "cpu", "!=", "obj", ".", "getCPU", "(", ")", ")", "{", "for", "(", "ObjectValue", "superObj", ":", "obj", ".", "superobjects", ")", "{", ...
Recursively updates all transitive references with the new CPU, but without removing the parent - child relation, unlike the deploy method. @param the objectvalue to update @param the target CPU of the redeploy
[ "Recursively", "updates", "all", "transitive", "references", "with", "the", "new", "CPU", "but", "without", "removing", "the", "parent", "-", "child", "relation", "unlike", "the", "deploy", "method", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/assistant/definition/ACpuClassDefinitionAssistantInterpreter.java#L111-L127
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/VdmPluginImages.java
VdmPluginImages.getDescriptor
public static ImageDescriptor getDescriptor(String key) { if (fgImageRegistry == null) { return fgAvoidSWTErrorMap.get(key); } return getImageRegistry().getDescriptor(key); }
java
public static ImageDescriptor getDescriptor(String key) { if (fgImageRegistry == null) { return fgAvoidSWTErrorMap.get(key); } return getImageRegistry().getDescriptor(key); }
[ "public", "static", "ImageDescriptor", "getDescriptor", "(", "String", "key", ")", "{", "if", "(", "fgImageRegistry", "==", "null", ")", "{", "return", "fgAvoidSWTErrorMap", ".", "get", "(", "key", ")", ";", "}", "return", "getImageRegistry", "(", ")", ".", ...
Returns the image descriptor for the given key in this registry. Might be called in a non-UI thread. @param key the image's key @return the image descriptor for the given key
[ "Returns", "the", "image", "descriptor", "for", "the", "given", "key", "in", "this", "registry", ".", "Might", "be", "called", "in", "a", "non", "-", "UI", "thread", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/VdmPluginImages.java#L679-L686
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.getActualTarget
private IContainer getActualTarget(IResource mouseTarget) { /* if cursor is on a file, return the parent */ if (mouseTarget.getType() == IResource.FILE) { return mouseTarget.getParent(); } /* otherwise the mouseTarget is the real target */ return (IContainer) mouseTarget; }
java
private IContainer getActualTarget(IResource mouseTarget) { /* if cursor is on a file, return the parent */ if (mouseTarget.getType() == IResource.FILE) { return mouseTarget.getParent(); } /* otherwise the mouseTarget is the real target */ return (IContainer) mouseTarget; }
[ "private", "IContainer", "getActualTarget", "(", "IResource", "mouseTarget", ")", "{", "/* if cursor is on a file, return the parent */", "if", "(", "mouseTarget", ".", "getType", "(", ")", "==", "IResource", ".", "FILE", ")", "{", "return", "mouseTarget", ".", "get...
Returns the actual target of the drop, given the resource under the mouse. If the mouse target is a file, then the drop actually occurs in its parent. If the drop location is before or after the mouse target and feedback is enabled, the target is also the parent.
[ "Returns", "the", "actual", "target", "of", "the", "drop", "given", "the", "resource", "under", "the", "mouse", ".", "If", "the", "mouse", "target", "is", "a", "file", "then", "the", "drop", "actually", "occurs", "in", "its", "parent", ".", "If", "the", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L337-L345
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.performResourceCopy
private IStatus performResourceCopy(CommonDropAdapter dropAdapter, Shell shell, IResource[] sources) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1, WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null); mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAda...
java
private IStatus performResourceCopy(CommonDropAdapter dropAdapter, Shell shell, IResource[] sources) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1, WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null); mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAda...
[ "private", "IStatus", "performResourceCopy", "(", "CommonDropAdapter", "dropAdapter", ",", "Shell", "shell", ",", "IResource", "[", "]", "sources", ")", "{", "MultiStatus", "problems", "=", "new", "MultiStatus", "(", "PlatformUI", ".", "PLUGIN_ID", ",", "1", ","...
Performs a resource copy
[ "Performs", "a", "resource", "copy" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L390-L410
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.performResourceMove
private IStatus performResourceMove(CommonDropAdapter dropAdapter, IResource[] sources) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1, WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null); mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAdapter.getCurre...
java
private IStatus performResourceMove(CommonDropAdapter dropAdapter, IResource[] sources) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1, WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null); mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAdapter.getCurre...
[ "private", "IStatus", "performResourceMove", "(", "CommonDropAdapter", "dropAdapter", ",", "IResource", "[", "]", "sources", ")", "{", "MultiStatus", "problems", "=", "new", "MultiStatus", "(", "PlatformUI", ".", "PLUGIN_ID", ",", "1", ",", "WorkbenchNavigatorMessag...
Performs a resource move
[ "Performs", "a", "resource", "move" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L415-L441
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.performFileDrop
private IStatus performFileDrop(CommonDropAdapter anAdapter, Object data) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 0, WorkbenchNavigatorMessages.DropAdapter_problemImporting, null); mergeStatus(problems, validateTarget(anAdapter.getCurrentTarget(), anAdapter .getCurrentTransfer()...
java
private IStatus performFileDrop(CommonDropAdapter anAdapter, Object data) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 0, WorkbenchNavigatorMessages.DropAdapter_problemImporting, null); mergeStatus(problems, validateTarget(anAdapter.getCurrentTarget(), anAdapter .getCurrentTransfer()...
[ "private", "IStatus", "performFileDrop", "(", "CommonDropAdapter", "anAdapter", ",", "Object", "data", ")", "{", "MultiStatus", "problems", "=", "new", "MultiStatus", "(", "PlatformUI", ".", "PLUGIN_ID", ",", "0", ",", "WorkbenchNavigatorMessages", ".", "DropAdapter...
Performs a drop using the FileTransfer transfer type.
[ "Performs", "a", "drop", "using", "the", "FileTransfer", "transfer", "type", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L446-L476
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.validateTarget
private IStatus validateTarget(Object target, TransferData transferType, int dropOperation) { if (target instanceof IVdmContainer) { target = ((IVdmContainer) target).getContainer(); } if (!(target instanceof IResource)) { return WorkbenchNavigatorPlugin .createInfoStatus(WorkbenchNavigat...
java
private IStatus validateTarget(Object target, TransferData transferType, int dropOperation) { if (target instanceof IVdmContainer) { target = ((IVdmContainer) target).getContainer(); } if (!(target instanceof IResource)) { return WorkbenchNavigatorPlugin .createInfoStatus(WorkbenchNavigat...
[ "private", "IStatus", "validateTarget", "(", "Object", "target", ",", "TransferData", "transferType", ",", "int", "dropOperation", ")", "{", "if", "(", "target", "instanceof", "IVdmContainer", ")", "{", "target", "=", "(", "(", "IVdmContainer", ")", "target", ...
Ensures that the drop target meets certain criteria
[ "Ensures", "that", "the", "drop", "target", "meets", "certain", "criteria" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L481-L540
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.mergeStatus
private void mergeStatus(MultiStatus status, IStatus toMerge) { if (!toMerge.isOK()) { status.merge(toMerge); } }
java
private void mergeStatus(MultiStatus status, IStatus toMerge) { if (!toMerge.isOK()) { status.merge(toMerge); } }
[ "private", "void", "mergeStatus", "(", "MultiStatus", "status", ",", "IStatus", "toMerge", ")", "{", "if", "(", "!", "toMerge", ".", "isOK", "(", ")", ")", "{", "status", ".", "merge", "(", "toMerge", ")", ";", "}", "}" ]
Adds the given status to the list of problems. Discards OK statuses. If the status is a multi-status, only its children are added.
[ "Adds", "the", "given", "status", "to", "the", "list", "of", "problems", ".", "Discards", "OK", "statuses", ".", "If", "the", "status", "is", "a", "multi", "-", "status", "only", "its", "children", "are", "added", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L546-L550
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java
VdmDropAdapterAssistent.openError
private void openError(IStatus status) { if (status == null) { return; } String genericTitle = WorkbenchNavigatorMessages.DropAdapter_title; int codes = IStatus.ERROR | IStatus.WARNING; // simple case: one error, not a multistatus if (!status.isMultiStatus()) { ErrorDialog .openError(getShell()...
java
private void openError(IStatus status) { if (status == null) { return; } String genericTitle = WorkbenchNavigatorMessages.DropAdapter_title; int codes = IStatus.ERROR | IStatus.WARNING; // simple case: one error, not a multistatus if (!status.isMultiStatus()) { ErrorDialog .openError(getShell()...
[ "private", "void", "openError", "(", "IStatus", "status", ")", "{", "if", "(", "status", "==", "null", ")", "{", "return", ";", "}", "String", "genericTitle", "=", "WorkbenchNavigatorMessages", ".", "DropAdapter_title", ";", "int", "codes", "=", "IStatus", "...
Opens an error dialog if necessary. Takes care of complex rules necessary for making the error dialog look nice.
[ "Opens", "an", "error", "dialog", "if", "necessary", ".", "Takes", "care", "of", "complex", "rules", "necessary", "for", "making", "the", "error", "dialog", "look", "nice", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/VdmDropAdapterAssistent.java#L556-L580
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/util/modules/ModuleList.java
ModuleList.importAll
private AFromModuleImports importAll(ILexIdentifierToken from) { List<List<PImport>> types = new Vector<List<PImport>>(); ILexNameToken all = new LexNameToken(from.getName(), "all", from.getLocation()); List<PImport> impAll = new Vector<PImport>(); AAllImport iport = AstFactory.newAAllImport(all); iport.setL...
java
private AFromModuleImports importAll(ILexIdentifierToken from) { List<List<PImport>> types = new Vector<List<PImport>>(); ILexNameToken all = new LexNameToken(from.getName(), "all", from.getLocation()); List<PImport> impAll = new Vector<PImport>(); AAllImport iport = AstFactory.newAAllImport(all); iport.setL...
[ "private", "AFromModuleImports", "importAll", "(", "ILexIdentifierToken", "from", ")", "{", "List", "<", "List", "<", "PImport", ">>", "types", "=", "new", "Vector", "<", "List", "<", "PImport", ">", ">", "(", ")", ";", "ILexNameToken", "all", "=", "new", ...
This function is copied from the module reader
[ "This", "function", "is", "copied", "from", "the", "module", "reader" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/util/modules/ModuleList.java#L166-L179
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/utils/ClassPathCollector.java
ClassPathCollector.toCpEnvString
public static String toCpEnvString(Collection<? extends String> entries) { if (entries.size() > 0) { StringBuffer classPath = new StringBuffer(""); for (String cp : new HashSet<String>(entries))// remove dublicates { if (cp == null) { continue; } classPath.append(cp); classPath.ap...
java
public static String toCpEnvString(Collection<? extends String> entries) { if (entries.size() > 0) { StringBuffer classPath = new StringBuffer(""); for (String cp : new HashSet<String>(entries))// remove dublicates { if (cp == null) { continue; } classPath.append(cp); classPath.ap...
[ "public", "static", "String", "toCpEnvString", "(", "Collection", "<", "?", "extends", "String", ">", "entries", ")", "{", "if", "(", "entries", ".", "size", "(", ")", ">", "0", ")", "{", "StringBuffer", "classPath", "=", "new", "StringBuffer", "(", "\"\...
Creates a class path string from the entries using the path.seperator @param entries @return the class path string
[ "Creates", "a", "class", "path", "string", "from", "the", "entries", "using", "the", "path", ".", "seperator" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/utils/ClassPathCollector.java#L55-L74
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/launchconfigurations/VdmLaunchShortcut.java
VdmLaunchShortcut.searchAndLaunch
private void searchAndLaunch(Object[] scope, String mode, String selectTitle, String emptyMessage) { INode[] types = null; try { project = findProject(scope, PlatformUI.getWorkbench().getProgressService()); ILaunchConfiguration config = findLaunchConfiguration(project.getName(), getConfigurationType()...
java
private void searchAndLaunch(Object[] scope, String mode, String selectTitle, String emptyMessage) { INode[] types = null; try { project = findProject(scope, PlatformUI.getWorkbench().getProgressService()); ILaunchConfiguration config = findLaunchConfiguration(project.getName(), getConfigurationType()...
[ "private", "void", "searchAndLaunch", "(", "Object", "[", "]", "scope", ",", "String", "mode", ",", "String", "selectTitle", ",", "String", "emptyMessage", ")", "{", "INode", "[", "]", "types", "=", "null", ";", "try", "{", "project", "=", "findProject", ...
Resolves a type that can be launched from the given scope and launches in the specified mode. @param scope the java elements to consider for a type that can be launched @param mode launch mode @param selectTitle prompting title for choosing a type to launch @param emptyMessage error message when no types are resolved ...
[ "Resolves", "a", "type", "that", "can", "be", "launched", "from", "the", "given", "scope", "and", "launches", "in", "the", "specified", "mode", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/launchconfigurations/VdmLaunchShortcut.java#L140-L182
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/launchconfigurations/VdmLaunchShortcut.java
VdmLaunchShortcut.chooseType
protected INode chooseType(INode[] types, String title) { try { DebugTypeSelectionDialog mmsd = new DebugTypeSelectionDialog(VdmDebugPlugin.getActiveWorkbenchShell(), types, title, project); if (mmsd.open() == Window.OK) { return (INode) mmsd.getResult()[0]; } } catch (Exception e) { e.print...
java
protected INode chooseType(INode[] types, String title) { try { DebugTypeSelectionDialog mmsd = new DebugTypeSelectionDialog(VdmDebugPlugin.getActiveWorkbenchShell(), types, title, project); if (mmsd.open() == Window.OK) { return (INode) mmsd.getResult()[0]; } } catch (Exception e) { e.print...
[ "protected", "INode", "chooseType", "(", "INode", "[", "]", "types", ",", "String", "title", ")", "{", "try", "{", "DebugTypeSelectionDialog", "mmsd", "=", "new", "DebugTypeSelectionDialog", "(", "VdmDebugPlugin", ".", "getActiveWorkbenchShell", "(", ")", ",", "...
Prompts the user to select a type from the given types. @param types the types to choose from @param title the selection dialog title @return the selected type or <code>null</code> if none.
[ "Prompts", "the", "user", "to", "select", "a", "type", "from", "the", "given", "types", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/launchconfigurations/VdmLaunchShortcut.java#L193-L208
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/BacktrackInputReader.java
BacktrackInputReader.readerFactory
public static InputStreamReader readerFactory(File file, String charset) throws IOException { String name = file.getName(); if (name.toLowerCase().endsWith(".doc")) { return new DocStreamReader(new FileInputStream(file), charset); } else if (name.toLowerCase().endsWith(".docx")) { return new DocxSt...
java
public static InputStreamReader readerFactory(File file, String charset) throws IOException { String name = file.getName(); if (name.toLowerCase().endsWith(".doc")) { return new DocStreamReader(new FileInputStream(file), charset); } else if (name.toLowerCase().endsWith(".docx")) { return new DocxSt...
[ "public", "static", "InputStreamReader", "readerFactory", "(", "File", "file", ",", "String", "charset", ")", "throws", "IOException", "{", "String", "name", "=", "file", ".", "getName", "(", ")", ";", "if", "(", "name", ".", "toLowerCase", "(", ")", ".", ...
Create an InputStreamReader from a File, depending on the filename. @param file @param charset @return @throws IOException
[ "Create", "an", "InputStreamReader", "from", "a", "File", "depending", "on", "the", "filename", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/BacktrackInputReader.java#L208-L226
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/BacktrackInputReader.java
BacktrackInputReader.read
@Override public int read(char[] cbuf, int off, int len) { int n = 0; while (pos != max && n < len) { cbuf[off + n++] = data[pos++]; } return n == 0 ? -1 : n; }
java
@Override public int read(char[] cbuf, int off, int len) { int n = 0; while (pos != max && n < len) { cbuf[off + n++] = data[pos++]; } return n == 0 ? -1 : n; }
[ "@", "Override", "public", "int", "read", "(", "char", "[", "]", "cbuf", ",", "int", "off", ",", "int", "len", ")", "{", "int", "n", "=", "0", ";", "while", "(", "pos", "!=", "max", "&&", "n", "<", "len", ")", "{", "cbuf", "[", "off", "+", ...
Read characters into the array passed.
[ "Read", "characters", "into", "the", "array", "passed", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/BacktrackInputReader.java#L304-L315
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/messages/rtlog/nextgen/NextGenRTLogger.java
NextGenRTLogger.toFile
public void toFile() throws IOException { if (logFile != null) { FileWriter fstream = new FileWriter(logFile + ".rttxt"); BufferedWriter out = new BufferedWriter(fstream); writeCPUdecls(out); writeBUSdecls(out); writeDeployObjs(out); writeEvents(out); out.flush(); out.close(); } }
java
public void toFile() throws IOException { if (logFile != null) { FileWriter fstream = new FileWriter(logFile + ".rttxt"); BufferedWriter out = new BufferedWriter(fstream); writeCPUdecls(out); writeBUSdecls(out); writeDeployObjs(out); writeEvents(out); out.flush(); out.close(); } }
[ "public", "void", "toFile", "(", ")", "throws", "IOException", "{", "if", "(", "logFile", "!=", "null", ")", "{", "FileWriter", "fstream", "=", "new", "FileWriter", "(", "logFile", "+", "\".rttxt\"", ")", ";", "BufferedWriter", "out", "=", "new", "Buffered...
Writing to log
[ "Writing", "to", "log" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/messages/rtlog/nextgen/NextGenRTLogger.java#L345-L361
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.getGlobal
public Context getGlobal() { Context op = this; while (op.outer != null) { op = op.outer; } return op; }
java
public Context getGlobal() { Context op = this; while (op.outer != null) { op = op.outer; } return op; }
[ "public", "Context", "getGlobal", "(", ")", "{", "Context", "op", "=", "this", ";", "while", "(", "op", ".", "outer", "!=", "null", ")", "{", "op", "=", "op", ".", "outer", ";", "}", "return", "op", ";", "}" ]
Find the outermost context from this one. @return The outermost context.
[ "Find", "the", "outermost", "context", "from", "this", "one", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L120-L130
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.deepCopy
public Context deepCopy() { Context below = null; if (outer != null) { below = outer.deepCopy(); } Context result = new Context(assistantFactory, location, title, below); result.threadState = threadState; for (ILexNameToken var : keySet()) { Value v = get(var); result.put(var, v.deepCopy())...
java
public Context deepCopy() { Context below = null; if (outer != null) { below = outer.deepCopy(); } Context result = new Context(assistantFactory, location, title, below); result.threadState = threadState; for (ILexNameToken var : keySet()) { Value v = get(var); result.put(var, v.deepCopy())...
[ "public", "Context", "deepCopy", "(", ")", "{", "Context", "below", "=", "null", ";", "if", "(", "outer", "!=", "null", ")", "{", "below", "=", "outer", ".", "deepCopy", "(", ")", ";", "}", "Context", "result", "=", "new", "Context", "(", "assistantF...
Make a deep copy of the context, using Value.deepCopy. Every concrete subclass must implements its own version of this method. @return
[ "Make", "a", "deep", "copy", "of", "the", "context", "using", "Value", ".", "deepCopy", ".", "Every", "concrete", "subclass", "must", "implements", "its", "own", "version", "of", "this", "method", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L151-L170
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.getVisibleVariables
public Context getVisibleVariables() { Context visible = new Context(assistantFactory, location, title, null); if (outer != null) { visible.putAll(outer.getVisibleVariables()); } visible.putAll(this); // Overriding anything below here return visible; }
java
public Context getVisibleVariables() { Context visible = new Context(assistantFactory, location, title, null); if (outer != null) { visible.putAll(outer.getVisibleVariables()); } visible.putAll(this); // Overriding anything below here return visible; }
[ "public", "Context", "getVisibleVariables", "(", ")", "{", "Context", "visible", "=", "new", "Context", "(", "assistantFactory", ",", "location", ",", "title", ",", "null", ")", ";", "if", "(", "outer", "!=", "null", ")", "{", "visible", ".", "putAll", "...
Get all visible names from this Context, with more visible values overriding those below. @return A new Context with all visible names.
[ "Get", "all", "visible", "names", "from", "this", "Context", "with", "more", "visible", "values", "overriding", "those", "below", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L235-L246
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.check
public Value check(ILexNameToken name) { Value v = get(name); if (v == null) { if (outer != null) { return outer.check(name); } } return v; }
java
public Value check(ILexNameToken name) { Value v = get(name); if (v == null) { if (outer != null) { return outer.check(name); } } return v; }
[ "public", "Value", "check", "(", "ILexNameToken", "name", ")", "{", "Value", "v", "=", "get", "(", "name", ")", ";", "if", "(", "v", "==", "null", ")", "{", "if", "(", "outer", "!=", "null", ")", "{", "return", "outer", ".", "check", "(", "name",...
Get the value for a given name. This searches outer contexts, if any are present. @param name The name to look for. @return The value of the name, or null.
[ "Get", "the", "value", "for", "a", "given", "name", ".", "This", "searches", "outer", "contexts", "if", "any", "are", "present", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L256-L269
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.locate
public Context locate(ILexNameToken name) { Value v = get(name); if (v == null) { if (outer != null) { return outer.locate(name); } else { return null; } } else { return this; } }
java
public Context locate(ILexNameToken name) { Value v = get(name); if (v == null) { if (outer != null) { return outer.locate(name); } else { return null; } } else { return this; } }
[ "public", "Context", "locate", "(", "ILexNameToken", "name", ")", "{", "Value", "v", "=", "get", "(", "name", ")", ";", "if", "(", "v", "==", "null", ")", "{", "if", "(", "outer", "!=", "null", ")", "{", "return", "outer", ".", "locate", "(", "na...
Locate the Context in a chain that contains a name, if any. @param name @return
[ "Locate", "the", "Context", "in", "a", "chain", "that", "contains", "a", "name", "if", "any", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L278-L295
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.writeObject
private synchronized void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException { ThreadState tmp = this.threadState; this.threadStateSerilizationHashedId = serilizationCache.store(this.threadState); this.threadState = null; stream.defaultWriteObject(); this.threadState = tmp; }
java
private synchronized void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException { ThreadState tmp = this.threadState; this.threadStateSerilizationHashedId = serilizationCache.store(this.threadState); this.threadState = null; stream.defaultWriteObject(); this.threadState = tmp; }
[ "private", "synchronized", "void", "writeObject", "(", "java", ".", "io", ".", "ObjectOutputStream", "stream", ")", "throws", "java", ".", "io", ".", "IOException", "{", "ThreadState", "tmp", "=", "this", ".", "threadState", ";", "this", ".", "threadStateSeril...
Custom serialization method handling the transient values @param stream @throws java.io.IOException
[ "Custom", "serialization", "method", "handling", "the", "transient", "values" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L382-L390
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java
Context.readObject
private synchronized void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, ClassNotFoundException { stream.defaultReadObject(); this.threadState = (ThreadState) serilizationCache.load(this.threadStateSerilizationHashedId); this.threadStateSerilizationHashedId = null; }
java
private synchronized void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, ClassNotFoundException { stream.defaultReadObject(); this.threadState = (ThreadState) serilizationCache.load(this.threadStateSerilizationHashedId); this.threadStateSerilizationHashedId = null; }
[ "private", "synchronized", "void", "readObject", "(", "java", ".", "io", ".", "ObjectInputStream", "stream", ")", "throws", "java", ".", "io", ".", "IOException", ",", "ClassNotFoundException", "{", "stream", ".", "defaultReadObject", "(", ")", ";", "this", "....
Custom de-serialization method handling the transient values @param stream @throws java.io.IOException @throws ClassNotFoundException
[ "Custom", "de", "-", "serialization", "method", "handling", "the", "transient", "values" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Context.java#L399-L405
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerExpVisitor.java
TypeCheckerExpVisitor.getMeasureApply
public String getMeasureApply(AApplyExp node, ILexNameToken measure, boolean close) { String start = null; PExp root = node.getRoot(); if (root instanceof AApplyExp) { AApplyExp aexp = (AApplyExp) root; start = getMeasureApply(aexp, measure, false); } else if (root instanceof AVariableExp) { s...
java
public String getMeasureApply(AApplyExp node, ILexNameToken measure, boolean close) { String start = null; PExp root = node.getRoot(); if (root instanceof AApplyExp) { AApplyExp aexp = (AApplyExp) root; start = getMeasureApply(aexp, measure, false); } else if (root instanceof AVariableExp) { s...
[ "public", "String", "getMeasureApply", "(", "AApplyExp", "node", ",", "ILexNameToken", "measure", ",", "boolean", "close", ")", "{", "String", "start", "=", "null", ";", "PExp", "root", "=", "node", ".", "getRoot", "(", ")", ";", "if", "(", "root", "inst...
Create a measure application string from this apply, turning the root function name into the measure name passed, and collapsing curried argument sets into one. @param node @param measure @param close @return
[ "Create", "a", "measure", "application", "string", "from", "this", "apply", "turning", "the", "root", "function", "name", "into", "the", "measure", "name", "passed", "and", "collapsing", "curried", "argument", "sets", "into", "one", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerExpVisitor.java#L3661-L3687
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/StateContext.java
StateContext.check
@Override public Value check(ILexNameToken name) { Value v = get(name); if (v != null) { return v; } if (freeVariables != null) { v = freeVariables.get(name); if (v != null) { return v; } } // A RootContext stops the name search from continuing down the // context chain. It fi...
java
@Override public Value check(ILexNameToken name) { Value v = get(name); if (v != null) { return v; } if (freeVariables != null) { v = freeVariables.get(name); if (v != null) { return v; } } // A RootContext stops the name search from continuing down the // context chain. It fi...
[ "@", "Override", "public", "Value", "check", "(", "ILexNameToken", "name", ")", "{", "Value", "v", "=", "get", "(", "name", ")", ";", "if", "(", "v", "!=", "null", ")", "{", "return", "v", ";", "}", "if", "(", "freeVariables", "!=", "null", ")", ...
Check for the name in the current context and state, and if not present search the global context. Note that the context chain is not followed. @see Context#check(ILexNameToken)
[ "Check", "for", "the", "name", "in", "the", "current", "context", "and", "state", "and", "if", "not", "present", "search", "the", "global", "context", ".", "Note", "that", "the", "context", "chain", "is", "not", "followed", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/StateContext.java#L95-L140
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/assistant/expression/PExpAssistantInterpreter.java
PExpAssistantInterpreter.getValues
public ValueList getValues(PExp exp, ObjectContext ctxt) { try { return exp.apply(af.getExpressionValueCollector(), ctxt);// FIXME: should we handle exceptions like this } catch (AnalysisException e) { return null; // Most have none } }
java
public ValueList getValues(PExp exp, ObjectContext ctxt) { try { return exp.apply(af.getExpressionValueCollector(), ctxt);// FIXME: should we handle exceptions like this } catch (AnalysisException e) { return null; // Most have none } }
[ "public", "ValueList", "getValues", "(", "PExp", "exp", ",", "ObjectContext", "ctxt", ")", "{", "try", "{", "return", "exp", ".", "apply", "(", "af", ".", "getExpressionValueCollector", "(", ")", ",", "ctxt", ")", ";", "// FIXME: should we handle exceptions like...
Return a list of all the updatable values read by the expression. This is used to add listeners to values that affect permission guards, so that the guard may be efficiently re-evaluated when the values change. @param exp @param ctxt The context in which to search for values. @return A list of values read by the expre...
[ "Return", "a", "list", "of", "all", "the", "updatable", "values", "read", "by", "the", "expression", ".", "This", "is", "used", "to", "add", "listeners", "to", "values", "that", "affect", "permission", "guards", "so", "that", "the", "guard", "may", "be", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/assistant/expression/PExpAssistantInterpreter.java#L35-L44
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/assistant/expression/PExpAssistantInterpreter.java
PExpAssistantInterpreter.findExpression
public PExp findExpression(PExp exp, int lineno) { try { return exp.apply(af.getExpExpressionFinder(), lineno);// FIXME: should we handle exceptions like this } catch (AnalysisException e) { return null; // Most have none } }
java
public PExp findExpression(PExp exp, int lineno) { try { return exp.apply(af.getExpExpressionFinder(), lineno);// FIXME: should we handle exceptions like this } catch (AnalysisException e) { return null; // Most have none } }
[ "public", "PExp", "findExpression", "(", "PExp", "exp", ",", "int", "lineno", ")", "{", "try", "{", "return", "exp", ".", "apply", "(", "af", ".", "getExpExpressionFinder", "(", ")", ",", "lineno", ")", ";", "// FIXME: should we handle exceptions like this", "...
Find an expression starting on the given line. Single expressions just compare their location to lineno, but expressions with sub-expressions iterate over their branches. @param exp @param lineno The line number to locate. @return An expression starting on the line, or null.
[ "Find", "an", "expression", "starting", "on", "the", "given", "line", ".", "Single", "expressions", "just", "compare", "their", "location", "to", "lineno", "but", "expressions", "with", "sub", "-", "expressions", "iterate", "over", "their", "branches", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/assistant/expression/PExpAssistantInterpreter.java#L55-L64
train
overturetool/overture
ide/plugins/rttraceviewer/src/main/java/org/overture/ide/plugins/rttraceviewer/data/TraceEventManager.java
TraceEventManager.getEvents
public List<INextGenEvent> getEvents(Long startTime) { ArrayList<INextGenEvent> eventList = null; //Key events where key is equal to or greater (null if nothing is found) Long eventKey = events.ceilingKey(startTime); if(eventKey != null) { eventList = events.get(eventKey); currentEventTime...
java
public List<INextGenEvent> getEvents(Long startTime) { ArrayList<INextGenEvent> eventList = null; //Key events where key is equal to or greater (null if nothing is found) Long eventKey = events.ceilingKey(startTime); if(eventKey != null) { eventList = events.get(eventKey); currentEventTime...
[ "public", "List", "<", "INextGenEvent", ">", "getEvents", "(", "Long", "startTime", ")", "{", "ArrayList", "<", "INextGenEvent", ">", "eventList", "=", "null", ";", "//Key events where key is equal to or greater (null if nothing is found)", "Long", "eventKey", "=", "eve...
Get events from a specified start time. If no events at specified time the next series of events is returned @param startTime time to start searching for events @return list of all events at this or the next event time
[ "Get", "events", "from", "a", "specified", "start", "time", ".", "If", "no", "events", "at", "specified", "time", "the", "next", "series", "of", "events", "is", "returned" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/plugins/rttraceviewer/src/main/java/org/overture/ide/plugins/rttraceviewer/data/TraceEventManager.java#L45-L56
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/dbgp/internal/utils/Base64Helper.java
Base64Helper.discardWhitespace
private static int discardWhitespace(byte[] data) { final int length = data.length; int i = 0; while (i < length) { byte c = data[i++]; if (c == (byte) ' ' || c == (byte) '\n' || c == (byte) '\r' || c == (byte) '\t') { int count = i - 1; while (i < length) { c = data[i++]; i...
java
private static int discardWhitespace(byte[] data) { final int length = data.length; int i = 0; while (i < length) { byte c = data[i++]; if (c == (byte) ' ' || c == (byte) '\n' || c == (byte) '\r' || c == (byte) '\t') { int count = i - 1; while (i < length) { c = data[i++]; i...
[ "private", "static", "int", "discardWhitespace", "(", "byte", "[", "]", "data", ")", "{", "final", "int", "length", "=", "data", ".", "length", ";", "int", "i", "=", "0", ";", "while", "(", "i", "<", "length", ")", "{", "byte", "c", "=", "data", ...
Discards any whitespace from a base-64 encoded block. The base64 data in responses could be chunked in the multiple lines, so we need to remove extra whitespaces. The bytes are copied in-place and the length of the actual data bytes is returned. @param bytes @return
[ "Discards", "any", "whitespace", "from", "a", "base", "-", "64", "encoded", "block", ".", "The", "base64", "data", "in", "responses", "could", "be", "chunked", "in", "the", "multiple", "lines", "so", "we", "need", "to", "remove", "extra", "whitespaces", "....
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/dbgp/internal/utils/Base64Helper.java#L91-L115
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/commands/CommandReader.java
CommandReader.setBreakpoint
private void setBreakpoint(File file, int line, String condition) throws Exception { if (file == null) { file = interpreter.getDefaultFile(); } if (file == null || file.getPath().equals("?")) { Set<File> files = interpreter.getSourceFiles(); if (files.size() > 1) { println("Assuming file...
java
private void setBreakpoint(File file, int line, String condition) throws Exception { if (file == null) { file = interpreter.getDefaultFile(); } if (file == null || file.getPath().equals("?")) { Set<File> files = interpreter.getSourceFiles(); if (files.size() > 1) { println("Assuming file...
[ "private", "void", "setBreakpoint", "(", "File", "file", ",", "int", "line", ",", "String", "condition", ")", "throws", "Exception", "{", "if", "(", "file", "==", "null", ")", "{", "file", "=", "interpreter", ".", "getDefaultFile", "(", ")", ";", "}", ...
Set a breakpoint at the given file and line with a condition. @param file The file name @param line The line number @param condition Any condition for the breakpoint, or null @throws Exception Problems parsing condition.
[ "Set", "a", "breakpoint", "at", "the", "given", "file", "and", "line", "with", "a", "condition", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/commands/CommandReader.java#L1305-L1353
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/commands/CommandReader.java
CommandReader.setBreakpoint
private void setBreakpoint(String name, String condition) throws Exception { LexTokenReader ltr = new LexTokenReader(name, Dialect.VDM_SL); LexToken token = ltr.nextToken(); ltr.close(); Value v = null; if (token.is(VDMToken.IDENTIFIER)) { LexIdentifierToken id = (LexIdentifierToken) token; LexName...
java
private void setBreakpoint(String name, String condition) throws Exception { LexTokenReader ltr = new LexTokenReader(name, Dialect.VDM_SL); LexToken token = ltr.nextToken(); ltr.close(); Value v = null; if (token.is(VDMToken.IDENTIFIER)) { LexIdentifierToken id = (LexIdentifierToken) token; LexName...
[ "private", "void", "setBreakpoint", "(", "String", "name", ",", "String", "condition", ")", "throws", "Exception", "{", "LexTokenReader", "ltr", "=", "new", "LexTokenReader", "(", "name", ",", "Dialect", ".", "VDM_SL", ")", ";", "LexToken", "token", "=", "lt...
Set a breakpoint at the given function or operation name with a condition. @param name The function or operation name. @param condition Any condition for the breakpoint, or null. @throws Exception Problems parsing condition.
[ "Set", "a", "breakpoint", "at", "the", "given", "function", "or", "operation", "name", "with", "a", "condition", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/commands/CommandReader.java#L1366-L1407
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java
LexTokenReader.rdCh
private char rdCh() { char c = super.readCh(); if (c == '\n') { linecount++; charpos = 0; } else if (c == '\t') { charpos += Properties.parser_tabstop - charpos % Properties.parser_tabstop; } else if (c != (char) -1) { charpos++; } ch = c; charsread++; offset = getCurrentRawRea...
java
private char rdCh() { char c = super.readCh(); if (c == '\n') { linecount++; charpos = 0; } else if (c == '\t') { charpos += Properties.parser_tabstop - charpos % Properties.parser_tabstop; } else if (c != (char) -1) { charpos++; } ch = c; charsread++; offset = getCurrentRawRea...
[ "private", "char", "rdCh", "(", ")", "{", "char", "c", "=", "super", ".", "readCh", "(", ")", ";", "if", "(", "c", "==", "'", "'", ")", "{", "linecount", "++", ";", "charpos", "=", "0", ";", "}", "else", "if", "(", "c", "==", "'", "'", ")",...
Read the next character from the stream. The position details are updated, accounting for newlines and tab stops. The next character is set in the "ch" field, as well as being returned for convenience. @return the next character.
[ "Read", "the", "next", "character", "from", "the", "stream", ".", "The", "position", "details", "are", "updated", "accounting", "for", "newlines", "and", "tab", "stops", ".", "The", "next", "character", "is", "set", "in", "the", "ch", "field", "as", "well"...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java#L405-L434
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java
LexTokenReader.rdQuotedCh
private char rdQuotedCh() throws LexException { quotedQuote = false; char c = rdCh(); if (c == '\\') { rdCh(); switch (ch) { case 'r': ch = '\r'; break; case 'n': ch = '\n'; break; case 't': ch = '\t'; break; case 'f': ch = '\f'; break; cas...
java
private char rdQuotedCh() throws LexException { quotedQuote = false; char c = rdCh(); if (c == '\\') { rdCh(); switch (ch) { case 'r': ch = '\r'; break; case 'n': ch = '\n'; break; case 't': ch = '\t'; break; case 'f': ch = '\f'; break; cas...
[ "private", "char", "rdQuotedCh", "(", ")", "throws", "LexException", "{", "quotedQuote", "=", "false", ";", "char", "c", "=", "rdCh", "(", ")", ";", "if", "(", "c", "==", "'", "'", ")", "{", "rdCh", "(", ")", ";", "switch", "(", "ch", ")", "{", ...
Read a backslash quoted character from the stream. This method is used when parsing strings and individual quoted characters, which may include things like "\n". @return The actual character value (eg. "\n" returns 10). @throws LexException
[ "Read", "a", "backslash", "quoted", "character", "from", "the", "stream", ".", "This", "method", "is", "used", "when", "parsing", "strings", "and", "individual", "quoted", "characters", "which", "may", "include", "things", "like", "\\", "n", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java#L444-L514
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java
LexTokenReader.rdNumber
private String rdNumber(int base) throws LexException { StringBuilder v = new StringBuilder(); int n = value(ch); // long v = n; v.append(ch); if (n < 0 || n >= base) { throwMessage(1001, "Invalid char [" + ch + "] in base " + base + " number"); } while (true) { rdCh(); n = value(ch);...
java
private String rdNumber(int base) throws LexException { StringBuilder v = new StringBuilder(); int n = value(ch); // long v = n; v.append(ch); if (n < 0 || n >= base) { throwMessage(1001, "Invalid char [" + ch + "] in base " + base + " number"); } while (true) { rdCh(); n = value(ch);...
[ "private", "String", "rdNumber", "(", "int", "base", ")", "throws", "LexException", "{", "StringBuilder", "v", "=", "new", "StringBuilder", "(", ")", ";", "int", "n", "=", "value", "(", "ch", ")", ";", "// long v = n;", "v", ".", "append", "(", "ch", "...
Read a number of the given base. Parsing terminates when a character not within the number base is read. @param base The base of the number (eg. 10 for reading decimals) @return The integer value of the number read. @throws LexException
[ "Read", "a", "number", "of", "the", "given", "base", ".", "Parsing", "terminates", "when", "a", "character", "not", "within", "the", "number", "base", "is", "read", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java#L572-L598
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java
LexTokenReader.rdReal
private LexToken rdReal(int tokline, int tokpos, int tokOffset) throws LexException { String floatSyntax = "Expecting <digits>[.<digits>][e<+-><digits>]"; String value = rdNumber(10); String fraction = null; String exponent = null; boolean negative = false; push(); if (ch == '.') { rdCh(); ...
java
private LexToken rdReal(int tokline, int tokpos, int tokOffset) throws LexException { String floatSyntax = "Expecting <digits>[.<digits>][e<+-><digits>]"; String value = rdNumber(10); String fraction = null; String exponent = null; boolean negative = false; push(); if (ch == '.') { rdCh(); ...
[ "private", "LexToken", "rdReal", "(", "int", "tokline", ",", "int", "tokpos", ",", "int", "tokOffset", ")", "throws", "LexException", "{", "String", "floatSyntax", "=", "\"Expecting <digits>[.<digits>][e<+-><digits>]\"", ";", "String", "value", "=", "rdNumber", "(",...
Read a decimal floating point number. @param tokline The start line of the number. @param tokpos The start position of the number. @param tokOffset @return Either a LexRealToken or a LexIntegerToken. @throws LexException
[ "Read", "a", "decimal", "floating", "point", "number", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java#L1062-L1144
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java
LexTokenReader.rdName
private List<String> rdName() { List<String> names = new Vector<String>(); names.add(rdIdentifier()); if (ch == '`') { if (startOfName(rdCh())) { names.add(rdIdentifier()); } } if (names.size() == 2) { // We have the strange mk_Mod`name case... String first = names.get(0); if (f...
java
private List<String> rdName() { List<String> names = new Vector<String>(); names.add(rdIdentifier()); if (ch == '`') { if (startOfName(rdCh())) { names.add(rdIdentifier()); } } if (names.size() == 2) { // We have the strange mk_Mod`name case... String first = names.get(0); if (f...
[ "private", "List", "<", "String", ">", "rdName", "(", ")", "{", "List", "<", "String", ">", "names", "=", "new", "Vector", "<", "String", ">", "(", ")", ";", "names", ".", "add", "(", "rdIdentifier", "(", ")", ")", ";", "if", "(", "ch", "==", "...
Read a fully qualified module`name. @return A list of one or two name parts.
[ "Read", "a", "fully", "qualified", "module", "name", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java#L1226-L1254
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java
LexTokenReader.rdIdentifier
private String rdIdentifier() { StringBuilder id = new StringBuilder(); id.append(ch); while (restOfName(rdCh())) { id.append(ch); } return id.toString(); }
java
private String rdIdentifier() { StringBuilder id = new StringBuilder(); id.append(ch); while (restOfName(rdCh())) { id.append(ch); } return id.toString(); }
[ "private", "String", "rdIdentifier", "(", ")", "{", "StringBuilder", "id", "=", "new", "StringBuilder", "(", ")", ";", "id", ".", "append", "(", "ch", ")", ";", "while", "(", "restOfName", "(", "rdCh", "(", ")", ")", ")", "{", "id", ".", "append", ...
Read a simple identifier without a module name prefix. @return a simple name.
[ "Read", "a", "simple", "identifier", "without", "a", "module", "name", "prefix", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/lex/LexTokenReader.java#L1262-L1273
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/assistant/pattern/PPatternAssistantTC.java
PPatternAssistantTC.getDefinitions
public List<PDefinition> getDefinitions(PPattern rp, PType ptype, NameScope scope) { PDefinitionSet set = af.createPDefinitionSet(); set.addAll(af.createPPatternAssistant().getAllDefinitions(rp, ptype, scope)); List<PDefinition> result = new Vector<PDefinition>(set); return result; }
java
public List<PDefinition> getDefinitions(PPattern rp, PType ptype, NameScope scope) { PDefinitionSet set = af.createPDefinitionSet(); set.addAll(af.createPPatternAssistant().getAllDefinitions(rp, ptype, scope)); List<PDefinition> result = new Vector<PDefinition>(set); return result; }
[ "public", "List", "<", "PDefinition", ">", "getDefinitions", "(", "PPattern", "rp", ",", "PType", "ptype", ",", "NameScope", "scope", ")", "{", "PDefinitionSet", "set", "=", "af", ".", "createPDefinitionSet", "(", ")", ";", "set", ".", "addAll", "(", "af",...
Get a set of definitions for the pattern's variables. Note that if the pattern includes duplicate variable names, these are collapse into one. @param rp @param ptype @param scope @return
[ "Get", "a", "set", "of", "definitions", "for", "the", "pattern", "s", "variables", ".", "Note", "that", "if", "the", "pattern", "includes", "duplicate", "variable", "names", "these", "are", "collapse", "into", "one", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/assistant/pattern/PPatternAssistantTC.java#L61-L68
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/assistant/pattern/PPatternAssistantTC.java
PPatternAssistantTC.getAllDefinitions
private List<PDefinition> getAllDefinitions(PPattern pattern, PType ptype, NameScope scope) { try { return pattern.apply(af.getAllDefinitionLocator(), new AllDefinitionLocator.NewQuestion(ptype, scope)); } catch (AnalysisException e) { return null; } }
java
private List<PDefinition> getAllDefinitions(PPattern pattern, PType ptype, NameScope scope) { try { return pattern.apply(af.getAllDefinitionLocator(), new AllDefinitionLocator.NewQuestion(ptype, scope)); } catch (AnalysisException e) { return null; } }
[ "private", "List", "<", "PDefinition", ">", "getAllDefinitions", "(", "PPattern", "pattern", ",", "PType", "ptype", ",", "NameScope", "scope", ")", "{", "try", "{", "return", "pattern", ".", "apply", "(", "af", ".", "getAllDefinitionLocator", "(", ")", ",", ...
Get a complete list of all definitions, including duplicates. This method should only be used only by PP
[ "Get", "a", "complete", "list", "of", "all", "definitions", "including", "duplicates", ".", "This", "method", "should", "only", "be", "used", "only", "by", "PP" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/assistant/pattern/PPatternAssistantTC.java#L73-L84
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java
VdmLaunchConfigurationDelegate.waitDebuggerConnected
protected void waitDebuggerConnected(ILaunch launch, DebugSessionAcceptor acceptor) throws CoreException { int timeout = VdmDebugPlugin.getDefault().getConnectionTimeout(); if (!acceptor.waitConnection(timeout)) { launch.terminate(); return; } if (!acceptor.waitInitialized(60 * 60 * 1000)) { la...
java
protected void waitDebuggerConnected(ILaunch launch, DebugSessionAcceptor acceptor) throws CoreException { int timeout = VdmDebugPlugin.getDefault().getConnectionTimeout(); if (!acceptor.waitConnection(timeout)) { launch.terminate(); return; } if (!acceptor.waitInitialized(60 * 60 * 1000)) { la...
[ "protected", "void", "waitDebuggerConnected", "(", "ILaunch", "launch", ",", "DebugSessionAcceptor", "acceptor", ")", "throws", "CoreException", "{", "int", "timeout", "=", "VdmDebugPlugin", ".", "getDefault", "(", ")", ".", "getConnectionTimeout", "(", ")", ";", ...
Waiting debugging process to connect to current launch @param launch launch to connect to @param acceptor @param monitor progress monitor @throws CoreException if debuggingProcess terminated, monitor is canceled or // * timeout
[ "Waiting", "debugging", "process", "to", "connect", "to", "current", "launch" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java#L137-L151
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java
VdmLaunchConfigurationDelegate.prepareCustomOvertureProperties
public static File prepareCustomOvertureProperties(IVdmProject project, ILaunchConfiguration configuration) throws CoreException { List<String> properties = new Vector<String>(); if (VdmDebugPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DBGP_ENABLE_EXPERIMENTAL_MODELCHECKER...
java
public static File prepareCustomOvertureProperties(IVdmProject project, ILaunchConfiguration configuration) throws CoreException { List<String> properties = new Vector<String>(); if (VdmDebugPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DBGP_ENABLE_EXPERIMENTAL_MODELCHECKER...
[ "public", "static", "File", "prepareCustomOvertureProperties", "(", "IVdmProject", "project", ",", "ILaunchConfiguration", "configuration", ")", "throws", "CoreException", "{", "List", "<", "String", ">", "properties", "=", "new", "Vector", "<", "String", ">", "(", ...
Create the custom overture.properties file loaded by the debugger @param project @param configuration a configuration or null @return @throws CoreException
[ "Create", "the", "custom", "overture", ".", "properties", "file", "loaded", "by", "the", "debugger" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java#L370-L381
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java
VdmLaunchConfigurationDelegate.getProbHomeProperty
public static String getProbHomeProperty() { final Bundle bundle = Platform.getBundle(ORG_OVERTURE_IDE_PLUGINS_PROBRUNTIME); if (bundle != null) { URL buildInfoUrl = FileLocator.find(bundle, new Path("prob/build_info.txt"), null); try { if (buildInfoUrl != null) { URL buildInfofileUrl = Fi...
java
public static String getProbHomeProperty() { final Bundle bundle = Platform.getBundle(ORG_OVERTURE_IDE_PLUGINS_PROBRUNTIME); if (bundle != null) { URL buildInfoUrl = FileLocator.find(bundle, new Path("prob/build_info.txt"), null); try { if (buildInfoUrl != null) { URL buildInfofileUrl = Fi...
[ "public", "static", "String", "getProbHomeProperty", "(", ")", "{", "final", "Bundle", "bundle", "=", "Platform", ".", "getBundle", "(", "ORG_OVERTURE_IDE_PLUGINS_PROBRUNTIME", ")", ";", "if", "(", "bundle", "!=", "null", ")", "{", "URL", "buildInfoUrl", "=", ...
Obtains the prob bundled executable and returns the prob.home property set to that location @return the prob.home property if available or empty string
[ "Obtains", "the", "prob", "bundled", "executable", "and", "returns", "the", "prob", ".", "home", "property", "set", "to", "that", "location" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java#L452-L477
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java
VdmLaunchConfigurationDelegate.getExtendedCommands
protected Collection<? extends String> getExtendedCommands( IVdmProject project, ILaunchConfiguration configuration) throws CoreException { return new Vector<String>(); }
java
protected Collection<? extends String> getExtendedCommands( IVdmProject project, ILaunchConfiguration configuration) throws CoreException { return new Vector<String>(); }
[ "protected", "Collection", "<", "?", "extends", "String", ">", "getExtendedCommands", "(", "IVdmProject", "project", ",", "ILaunchConfiguration", "configuration", ")", "throws", "CoreException", "{", "return", "new", "Vector", "<", "String", ">", "(", ")", ";", ...
Intended to be used when sub classing the delegate to add additional parameters to the launch of VDMJ @param project the project launched @param configuration the launch configuration @return a list of parameters to be added to the command line just before the files @throws CoreException
[ "Intended", "to", "be", "used", "when", "sub", "classing", "the", "delegate", "to", "add", "additional", "parameters", "to", "the", "launch", "of", "VDMJ" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java#L489-L494
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java
VdmLaunchConfigurationDelegate.abort
private static void abort(String message, Throwable e) throws CoreException { throw new CoreException((IStatus) new Status(IStatus.ERROR, IDebugConstants.PLUGIN_ID, 0, message, e)); }
java
private static void abort(String message, Throwable e) throws CoreException { throw new CoreException((IStatus) new Status(IStatus.ERROR, IDebugConstants.PLUGIN_ID, 0, message, e)); }
[ "private", "static", "void", "abort", "(", "String", "message", ",", "Throwable", "e", ")", "throws", "CoreException", "{", "throw", "new", "CoreException", "(", "(", "IStatus", ")", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "IDebugConstants", ".",...
Throws an exception with a new status containing the given message and optional exception. @param message error message @param e underlying exception @throws CoreException
[ "Throws", "an", "exception", "with", "a", "new", "status", "containing", "the", "given", "message", "and", "optional", "exception", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/launching/VdmLaunchConfigurationDelegate.java#L621-L624
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/AbstractVdmBreakpoint.java
AbstractVdmBreakpoint.register
public void register(boolean register) throws CoreException { DebugPlugin plugin = DebugPlugin.getDefault(); if (plugin != null && register) { plugin.getBreakpointManager().addBreakpoint(this); } else { setRegistered(false); } }
java
public void register(boolean register) throws CoreException { DebugPlugin plugin = DebugPlugin.getDefault(); if (plugin != null && register) { plugin.getBreakpointManager().addBreakpoint(this); } else { setRegistered(false); } }
[ "public", "void", "register", "(", "boolean", "register", ")", "throws", "CoreException", "{", "DebugPlugin", "plugin", "=", "DebugPlugin", ".", "getDefault", "(", ")", ";", "if", "(", "plugin", "!=", "null", "&&", "register", ")", "{", "plugin", ".", "get...
Add this breakpoint to the breakpoint manager, or sets it as unregistered.
[ "Add", "this", "breakpoint", "to", "the", "breakpoint", "manager", "or", "sets", "it", "as", "unregistered", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/AbstractVdmBreakpoint.java#L410-L420
train
overturetool/overture
ide/core/src/main/java/org/overture/ide/core/utility/ClasspathUtils.java
ClasspathUtils.getBundleFile
public static File getBundleFile(Bundle bundle) throws IOException { URL rootEntry = bundle.getEntry("/"); //$NON-NLS-1$ rootEntry = FileLocator.resolve(rootEntry); if ("file".equals(rootEntry.getProtocol())) //$NON-NLS-1$ return new File(rootEntry.getPath()); if ("jar".equals(rootEntry.getProtocol())) { //$...
java
public static File getBundleFile(Bundle bundle) throws IOException { URL rootEntry = bundle.getEntry("/"); //$NON-NLS-1$ rootEntry = FileLocator.resolve(rootEntry); if ("file".equals(rootEntry.getProtocol())) //$NON-NLS-1$ return new File(rootEntry.getPath()); if ("jar".equals(rootEntry.getProtocol())) { //$...
[ "public", "static", "File", "getBundleFile", "(", "Bundle", "bundle", ")", "throws", "IOException", "{", "URL", "rootEntry", "=", "bundle", ".", "getEntry", "(", "\"/\"", ")", ";", "//$NON-NLS-1$", "rootEntry", "=", "FileLocator", ".", "resolve", "(", "rootEnt...
Returns a file for the contents of the specified bundle. Depending on how the bundle is installed the returned file may be a directory or a jar file containing the bundle content. XXX 3.3 compatibility = {@link FileLocator#getBundleFile(Bundle)} @param bundle the bundle @return a file with the contents of the bundle ...
[ "Returns", "a", "file", "for", "the", "contents", "of", "the", "specified", "bundle", ".", "Depending", "on", "how", "the", "bundle", "is", "installed", "the", "returned", "file", "may", "be", "a", "directory", "or", "a", "jar", "file", "containing", "the"...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/core/src/main/java/org/overture/ide/core/utility/ClasspathUtils.java#L173-L187
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/operations/DbgpDebugger.java
DbgpDebugger.getFeature
public IDbgpFeature getFeature(String name) throws DbgpException { IDbgpCoreCommands core = session.getCoreCommands(); return core.getFeature(name); }
java
public IDbgpFeature getFeature(String name) throws DbgpException { IDbgpCoreCommands core = session.getCoreCommands(); return core.getFeature(name); }
[ "public", "IDbgpFeature", "getFeature", "(", "String", "name", ")", "throws", "DbgpException", "{", "IDbgpCoreCommands", "core", "=", "session", ".", "getCoreCommands", "(", ")", ";", "return", "core", ".", "getFeature", "(", "name", ")", ";", "}" ]
Feature helper methods
[ "Feature", "helper", "methods" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/operations/DbgpDebugger.java#L140-L144
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/merging/MergeVisitor.java
MergeVisitor.addDefaults
public TemplateCallable[] addDefaults(TemplateCallable[] userCallables) { TemplateCallable strFunctionality = new TemplateCallable(String.class.getSimpleName(), String.class); for (TemplateCallable u : userCallables) { if (u.equals(strFunctionality)) { return userCallables; } } return GeneralU...
java
public TemplateCallable[] addDefaults(TemplateCallable[] userCallables) { TemplateCallable strFunctionality = new TemplateCallable(String.class.getSimpleName(), String.class); for (TemplateCallable u : userCallables) { if (u.equals(strFunctionality)) { return userCallables; } } return GeneralU...
[ "public", "TemplateCallable", "[", "]", "addDefaults", "(", "TemplateCallable", "[", "]", "userCallables", ")", "{", "TemplateCallable", "strFunctionality", "=", "new", "TemplateCallable", "(", "String", ".", "class", ".", "getSimpleName", "(", ")", ",", "String",...
Enables the static methods of the java.lang.String class to be called from the templates. If the key "String" is already reserved by the user, this method simply returns the input parameter. @param userCallables @return all the template callables
[ "Enables", "the", "static", "methods", "of", "the", "java", ".", "lang", ".", "String", "class", "to", "be", "called", "from", "the", "templates", ".", "If", "the", "key", "String", "is", "already", "reserved", "by", "the", "user", "this", "method", "sim...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/merging/MergeVisitor.java#L80-L94
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.performOk
public boolean performOk() { IWorkspaceRunnable wr = new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { IVdmBreakpoint breakpoint = getBreakpoint(); boolean delOnCancel = breakpoint.getMarker().getAttribute(ATTR_DELETE_ON_CANCEL) != null; if (delOnCancel) ...
java
public boolean performOk() { IWorkspaceRunnable wr = new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { IVdmBreakpoint breakpoint = getBreakpoint(); boolean delOnCancel = breakpoint.getMarker().getAttribute(ATTR_DELETE_ON_CANCEL) != null; if (delOnCancel) ...
[ "public", "boolean", "performOk", "(", ")", "{", "IWorkspaceRunnable", "wr", "=", "new", "IWorkspaceRunnable", "(", ")", "{", "public", "void", "run", "(", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "IVdmBreakpoint", "breakpoint", "=", "...
Store the breakpoint properties. @see org.eclipse.jface.preference.IPreferencePage#performOk()
[ "Store", "the", "breakpoint", "properties", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L84-L111
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.storeHitCount
private void storeHitCount(IVdmBreakpoint breakpoint) throws CoreException { int hitCount = -1; // if (fHitCountButton.getSelection()) // { try { hitCount = Integer.parseInt(fHitValueText.getText()); } catch (NumberFormatException e) { // JDIDebugUIPlugin.log(new Status(IStatus.ERROR, JDIDebugUI...
java
private void storeHitCount(IVdmBreakpoint breakpoint) throws CoreException { int hitCount = -1; // if (fHitCountButton.getSelection()) // { try { hitCount = Integer.parseInt(fHitValueText.getText()); } catch (NumberFormatException e) { // JDIDebugUIPlugin.log(new Status(IStatus.ERROR, JDIDebugUI...
[ "private", "void", "storeHitCount", "(", "IVdmBreakpoint", "breakpoint", ")", "throws", "CoreException", "{", "int", "hitCount", "=", "-", "1", ";", "// if (fHitCountButton.getSelection())", "// {", "try", "{", "hitCount", "=", "Integer", ".", "parseInt", "(", "fH...
Stores the value of the hit count in the breakpoint. @param breakpoint the breakpoint to update @throws CoreException if an exception occurs while setting the hit count
[ "Stores", "the", "value", "of", "the", "hit", "count", "in", "the", "breakpoint", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L183-L199
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createContents
protected Control createContents(Composite parent) { setTitle("TODO: property title (VdmBreakpointPropertyPage)"); noDefaultAndApplyButton(); Composite mainComposite = createComposite(parent, 1); createLabels(mainComposite); try { createEnabledButton(mainComposite); createHitValueEditor(mainComposite...
java
protected Control createContents(Composite parent) { setTitle("TODO: property title (VdmBreakpointPropertyPage)"); noDefaultAndApplyButton(); Composite mainComposite = createComposite(parent, 1); createLabels(mainComposite); try { createEnabledButton(mainComposite); createHitValueEditor(mainComposite...
[ "protected", "Control", "createContents", "(", "Composite", "parent", ")", "{", "setTitle", "(", "\"TODO: property title (VdmBreakpointPropertyPage)\"", ")", ";", "noDefaultAndApplyButton", "(", ")", ";", "Composite", "mainComposite", "=", "createComposite", "(", "parent"...
Creates the labels and editors displayed for the breakpoint. @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
[ "Creates", "the", "labels", "and", "editors", "displayed", "for", "the", "breakpoint", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L222-L276
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createLabels
protected void createLabels(Composite parent) { Composite labelComposite = createComposite(parent, 2); try { String typeName = ((IVdmBreakpoint) getElement()).getMessage(); if (typeName != null) { String s = getTypeName(typeName); createLabel(labelComposite, "Filename:"); Text text = SWTFact...
java
protected void createLabels(Composite parent) { Composite labelComposite = createComposite(parent, 2); try { String typeName = ((IVdmBreakpoint) getElement()).getMessage(); if (typeName != null) { String s = getTypeName(typeName); createLabel(labelComposite, "Filename:"); Text text = SWTFact...
[ "protected", "void", "createLabels", "(", "Composite", "parent", ")", "{", "Composite", "labelComposite", "=", "createComposite", "(", "parent", ",", "2", ")", ";", "try", "{", "String", "typeName", "=", "(", "(", "IVdmBreakpoint", ")", "getElement", "(", ")...
Creates the labels displayed for the breakpoint. @param parent
[ "Creates", "the", "labels", "displayed", "for", "the", "breakpoint", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L297-L316
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.hitCountChanged
private void hitCountChanged() { if (!fHitValueButton.getSelection()) { removeErrorMessage(fgHitCountErrorMessage); return; } String hitCountText = fHitValueText.getText(); int hitCount = -1; try { hitCount = Integer.parseInt(hitCountText); } catch (NumberFormatException e1) { addErrorMes...
java
private void hitCountChanged() { if (!fHitValueButton.getSelection()) { removeErrorMessage(fgHitCountErrorMessage); return; } String hitCountText = fHitValueText.getText(); int hitCount = -1; try { hitCount = Integer.parseInt(hitCountText); } catch (NumberFormatException e1) { addErrorMes...
[ "private", "void", "hitCountChanged", "(", ")", "{", "if", "(", "!", "fHitValueButton", ".", "getSelection", "(", ")", ")", "{", "removeErrorMessage", "(", "fgHitCountErrorMessage", ")", ";", "return", ";", "}", "String", "hitCountText", "=", "fHitValueText", ...
Validates the current state of the hit count editor. Hit count value must be a positive integer.
[ "Validates", "the", "current", "state", "of", "the", "hit", "count", "editor", ".", "Hit", "count", "value", "must", "be", "a", "positive", "integer", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L402-L426
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createEnabledButton
protected void createEnabledButton(Composite parent) throws CoreException { fEnabledButton = createCheckButton(parent, "Enable"); fEnabledButton.setSelection(getBreakpoint().isEnabled()); }
java
protected void createEnabledButton(Composite parent) throws CoreException { fEnabledButton = createCheckButton(parent, "Enable"); fEnabledButton.setSelection(getBreakpoint().isEnabled()); }
[ "protected", "void", "createEnabledButton", "(", "Composite", "parent", ")", "throws", "CoreException", "{", "fEnabledButton", "=", "createCheckButton", "(", "parent", ",", "\"Enable\"", ")", ";", "fEnabledButton", ".", "setSelection", "(", "getBreakpoint", "(", ")"...
Creates the button to toggle enablement of the breakpoint @param parent @throws CoreException
[ "Creates", "the", "button", "to", "toggle", "enablement", "of", "the", "breakpoint" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L434-L438
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createText
protected Text createText(Composite parent, String initialValue) { Text t = SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1); t.setText(initialValue); return t; }
java
protected Text createText(Composite parent, String initialValue) { Text t = SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1); t.setText(initialValue); return t; }
[ "protected", "Text", "createText", "(", "Composite", "parent", ",", "String", "initialValue", ")", "{", "Text", "t", "=", "SWTFactory", ".", "createText", "(", "parent", ",", "SWT", ".", "SINGLE", "|", "SWT", ".", "BORDER", ",", "1", ")", ";", "t", "."...
Creates a fully configured text editor with the given initial value @param parent @param initialValue @return the configured text editor
[ "Creates", "a", "fully", "configured", "text", "editor", "with", "the", "given", "initial", "value" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L476-L481
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createComposite
protected Composite createComposite(Composite parent, int numColumns) { return SWTFactory.createComposite(parent, parent.getFont(), numColumns, 1, GridData.FILL_HORIZONTAL, 0, 0); }
java
protected Composite createComposite(Composite parent, int numColumns) { return SWTFactory.createComposite(parent, parent.getFont(), numColumns, 1, GridData.FILL_HORIZONTAL, 0, 0); }
[ "protected", "Composite", "createComposite", "(", "Composite", "parent", ",", "int", "numColumns", ")", "{", "return", "SWTFactory", ".", "createComposite", "(", "parent", ",", "parent", ".", "getFont", "(", ")", ",", "numColumns", ",", "1", ",", "GridData", ...
Creates a fully configured composite with the given number of columns @param parent @param numColumns @return the configured composite
[ "Creates", "a", "fully", "configured", "composite", "with", "the", "given", "number", "of", "columns" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L490-L493
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createCheckButton
protected Button createCheckButton(Composite parent, String text) { return SWTFactory.createCheckButton(parent, text, null, false, 1); }
java
protected Button createCheckButton(Composite parent, String text) { return SWTFactory.createCheckButton(parent, text, null, false, 1); }
[ "protected", "Button", "createCheckButton", "(", "Composite", "parent", ",", "String", "text", ")", "{", "return", "SWTFactory", ".", "createCheckButton", "(", "parent", ",", "text", ",", "null", ",", "false", ",", "1", ")", ";", "}" ]
Creates a fully configured check button with the given text. @param parent the parent composite @param text the label of the returned check button @return a fully configured check button
[ "Creates", "a", "fully", "configured", "check", "button", "with", "the", "given", "text", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L504-L507
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createLabel
protected Label createLabel(Composite parent, String text) { return SWTFactory.createLabel(parent, text, 1); }
java
protected Label createLabel(Composite parent, String text) { return SWTFactory.createLabel(parent, text, 1); }
[ "protected", "Label", "createLabel", "(", "Composite", "parent", ",", "String", "text", ")", "{", "return", "SWTFactory", ".", "createLabel", "(", "parent", ",", "text", ",", "1", ")", ";", "}" ]
Creates a fully configured label with the given text. @param parent the parent composite @param text the test of the returned label @return a fully configured label
[ "Creates", "a", "fully", "configured", "label", "with", "the", "given", "text", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L518-L521
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.createRadioButton
protected Button createRadioButton(Composite parent, String text) { return SWTFactory.createRadioButton(parent, text); }
java
protected Button createRadioButton(Composite parent, String text) { return SWTFactory.createRadioButton(parent, text); }
[ "protected", "Button", "createRadioButton", "(", "Composite", "parent", ",", "String", "text", ")", "{", "return", "SWTFactory", ".", "createRadioButton", "(", "parent", ",", "text", ")", ";", "}" ]
Creates a fully configured radio button with the given text. @param parent the parent composite @param text the label of the returned radio button @return a fully configured radio button
[ "Creates", "a", "fully", "configured", "radio", "button", "with", "the", "given", "text", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L533-L536
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java
VdmBreakpointPropertyPage.performCancel
public boolean performCancel() { try { if (getBreakpoint().getMarker().getAttribute(ATTR_DELETE_ON_CANCEL) != null) { // if this breakpoint is being created, delete on cancel getBreakpoint().delete(); } } catch (CoreException e) { // JDIDebugUIPlugin.statusDialog(PropertyPageMessages.JavaBr...
java
public boolean performCancel() { try { if (getBreakpoint().getMarker().getAttribute(ATTR_DELETE_ON_CANCEL) != null) { // if this breakpoint is being created, delete on cancel getBreakpoint().delete(); } } catch (CoreException e) { // JDIDebugUIPlugin.statusDialog(PropertyPageMessages.JavaBr...
[ "public", "boolean", "performCancel", "(", ")", "{", "try", "{", "if", "(", "getBreakpoint", "(", ")", ".", "getMarker", "(", ")", ".", "getAttribute", "(", "ATTR_DELETE_ON_CANCEL", ")", "!=", "null", ")", "{", "// if this breakpoint is being created, delete on ca...
Check to see if the breakpoint should be deleted.
[ "Check", "to", "see", "if", "the", "breakpoint", "should", "be", "deleted", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L541-L555
train