code
stringlengths
73
34.1k
label
stringclasses
1 value
public void setBackgroundColor(float r, float g, float b, float a) { setBackgroundColorR(r); setBackgroundColorG(g); setBackgroundColorB(b); setBackgroundColorA(a); }
java
public void addPostEffect(GVRMaterial postEffectData) { GVRContext ctx = getGVRContext(); if (mPostEffects == null) { mPostEffects = new GVRRenderData(ctx, postEffectData); GVRMesh dummyMesh = new GVRMesh(getGVRContext(),"float3 a_position float2 a_texcoord"); ...
java
public int getBoneIndex(GVRSceneObject bone) { for (int i = 0; i < getNumBones(); ++i) if (mBones[i] == bone) return i; return -1; }
java
public int getBoneIndex(String bonename) { for (int i = 0; i < getNumBones(); ++i) if (mBoneNames[i].equals(bonename)) return i; return -1; }
java
public void setBoneName(int boneindex, String bonename) { mBoneNames[boneindex] = bonename; NativeSkeleton.setBoneName(getNative(), boneindex, bonename); }
java
public void poseFromBones() { for (int i = 0; i < getNumBones(); ++i) { GVRSceneObject bone = mBones[i]; if (bone == null) { continue; } if ((mBoneOptions[i] & BONE_LOCK_ROTATION) != 0) { continue...
java
public void merge(GVRSkeleton newSkel) { int numBones = getNumBones(); List<Integer> parentBoneIds = new ArrayList<Integer>(numBones + newSkel.getNumBones()); List<String> newBoneNames = new ArrayList<String>(newSkel.getNumBones()); List<Matrix4f> newMatrices = new ArrayList<Matrix4f...
java
public View getFullScreenView() { if (mFullScreenView != null) { return mFullScreenView; } final DisplayMetrics metrics = new DisplayMetrics(); mActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics); final int screenWidthPixels = Math.max(metrics.widthP...
java
public final void unregisterView(final View view) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) { mRenderableViewGroup.removeView(view); ...
java
public void clear() { List<Widget> children = getChildren(); Log.d(TAG, "clear(%s): removing %d children", getName(), children.size()); for (Widget child : children) { removeChild(child, true); } requestLayout(); }
java
protected boolean inViewPort(final int dataIndex) { boolean inViewPort = true; for (Layout layout: mLayouts) { inViewPort = inViewPort && (layout.inViewPort(dataIndex) || !layout.isClippingEnabled()); } return inViewPort; }
java
public void setDataOffsets(int[] offsets) { assert(mLevels == offsets.length); NativeBitmapImage.updateCompressed(getNative(), mWidth, mHeight, mImageSize, mData, mLevels, offsets); mData = null; }
java
public static String getFilename(String path) throws IllegalArgumentException { if (Pattern.matches(sPatternUrl, path)) return getURLFilename(path); return new File(path).getName(); }
java
public static String getParentDirectory(String filePath) throws IllegalArgumentException { if (Pattern.matches(sPatternUrl, filePath)) return getURLParentDirectory(filePath); return new File(filePath).getParent(); }
java
public static String getURLParentDirectory(String urlString) throws IllegalArgumentException { URL url = null; try { url = new URL(urlString); } catch (MalformedURLException e) { throw Exceptions.IllegalArgument("Malformed URL: %s", url); } String path = ...
java
@Override protected void clearReference(EObject obj, EReference ref) { super.clearReference(obj, ref); if (obj.eIsSet(ref) && ref.getEType().equals(XtextPackage.Literals.TYPE_REF)) { INode node = NodeModelUtils.getNode((EObject) obj.eGet(ref)); if (node == null) obj.eUnset(ref); } if (obj.eIsSet(ref)...
java
public CancelIndicator newCancelIndicator(final ResourceSet rs) { CancelIndicator _xifexpression = null; if ((rs instanceof XtextResourceSet)) { final boolean cancelationAllowed = (this.cancelationAllowed.get()).booleanValue(); final int current = ((XtextResourceSet)rs).getModificationStamp(); ...
java
public ContentAssistEntry createProposal(final String proposal, final ContentAssistContext context) { return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_UNKNOWN, null); }
java
public ContentAssistEntry createSnippet(final String proposal, final String label, final ContentAssistContext context) { final Procedure1<ContentAssistEntry> _function = (ContentAssistEntry it) -> { it.setLabel(label); }; return this.createProposal(proposal, context.getPrefix(), context, ContentAssist...
java
public ContentAssistEntry createProposal(final String proposal, final ContentAssistContext context, final Procedure1<? super ContentAssistEntry> init) { return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_UNKNOWN, init); }
java
public ContentAssistEntry createProposal(final String proposal, final String prefix, final ContentAssistContext context, final String kind, final Procedure1<? super ContentAssistEntry> init) { boolean _isValidProposal = this.isValidProposal(proposal, prefix, context); if (_isValidProposal) { final Content...
java
public String toDecodedString(final java.net.URI uri) { final String scheme = uri.getScheme(); final String part = uri.getSchemeSpecificPart(); if ((scheme == null)) { return part; } return ((scheme + ":") + part); }
java
public URI withEmptyAuthority(final URI uri) { URI _xifexpression = null; if ((uri.isFile() && (uri.authority() == null))) { _xifexpression = URI.createHierarchicalURI(uri.scheme(), "", uri.device(), uri.segments(), uri.query(), uri.fragment()); } else { _xifexpression = uri; } return _x...
java
public String[][] getRequiredRuleNames(Param param) { if (isFiltered(param)) { return EMPTY_ARRAY; } AbstractElement elementToParse = param.elementToParse; String ruleName = param.ruleName; if (ruleName == null) { return getRequiredRuleNames(param, elementToParse); } return getAdjustedRequiredRuleNa...
java
protected boolean isFiltered(Param param) { AbstractElement elementToParse = param.elementToParse; while (elementToParse != null) { if (isFiltered(elementToParse, param)) { return true; } elementToParse = getEnclosingSingleElementGroup(elementToParse); } return false; }
java
protected AbstractElement getEnclosingSingleElementGroup(AbstractElement elementToParse) { EObject container = elementToParse.eContainer(); if (container instanceof Group) { if (((Group) container).getElements().size() == 1) { return (AbstractElement) container; } } return null; }
java
protected boolean isFiltered(AbstractElement canddiate, Param param) { if (canddiate instanceof Group) { Group group = (Group) canddiate; if (group.getGuardCondition() != null) { Set<Parameter> context = param.getAssignedParametes(); ConditionEvaluator evaluator = new ConditionEvaluator(context); if...
java
public static boolean isJavaLangType(String s) { return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0)); }
java
public ContentAssistContext.Builder copy() { Builder result = builderProvider.get(); result.copyFrom(this); return result; }
java
public ImmutableList<AbstractElement> getFirstSetGrammarElements() { if (firstSetGrammarElements == null) { firstSetGrammarElements = ImmutableList.copyOf(mutableFirstSetGrammarElements); } return firstSetGrammarElements; }
java
public int getReplaceContextLength() { if (replaceContextLength == null) { int replacementOffset = getReplaceRegion().getOffset(); ITextRegion currentRegion = getCurrentNode().getTextRegion(); int replaceContextLength = currentRegion.getLength() - (replacementOffset - currentRegion.getOffset()); this.repl...
java
protected String getFormattedDatatypeValue(ICompositeNode node, AbstractRule rule, String text) throws ValueConverterException { Object value = valueConverter.toValue(text, rule.getName(), node); text = valueConverter.toString(value, rule.getName()); return text; }
java
public String splitSpecialStateSwitch(String specialStateTransition){ Matcher transformedSpecialStateMatcher = TRANSORMED_SPECIAL_STATE_TRANSITION_METHOD.matcher(specialStateTransition); if( !transformedSpecialStateMatcher.find() ){ return specialStateTransition; } String specialStateSwitch = transfor...
java
public boolean merge(final PluginXmlAccess other) { boolean _xblockexpression = false; { String _path = this.getPath(); String _path_1 = other.getPath(); boolean _notEquals = (!Objects.equal(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus...
java
protected Iterable<URI> getTargetURIs(final EObject primaryTarget) { final TargetURIs result = targetURIsProvider.get(); uriCollector.add(primaryTarget, result); return result; }
java
public void setRegularExpression(String regularExpression) { if (regularExpression != null) this.regularExpression = Pattern.compile(regularExpression); else this.regularExpression = null; }
java
public void registerServices(boolean force) { Injector injector = Guice.createInjector(getGuiceModule()); injector.injectMembers(this); registerInRegistry(force); }
java
public void register(Delta delta) { final IResourceDescription newDesc = delta.getNew(); if (newDesc == null) { removeDescription(delta.getUri()); } else { addDescription(delta.getUri(), newDesc); } }
java
protected AbsoluteURI getGeneratedLocation(PersistedTrace trace) { AbsoluteURI path = trace.getPath(); String fileName = traceFileNameProvider.getJavaFromTrace(path.getURI().toString()); return new AbsoluteURI(fileName); }
java
public static <T extends EObject> IScope scopeFor(Iterable<? extends T> elements, final Function<T, QualifiedName> nameComputation, IScope outer) { return new SimpleScope(outer,scopedElementsFor(elements, nameComputation)); }
java
protected int compare(MethodDesc o1, MethodDesc o2) { final Class<?>[] paramTypes1 = o1.getParameterTypes(); final Class<?>[] paramTypes2 = o2.getParameterTypes(); // sort by parameter types from left to right for (int i = 0; i < paramTypes1.length; i++) { final Class<?> class1 = paramTypes1[i]; final Cl...
java
protected void writeEntries(final StorageAwareResource resource, final ZipOutputStream zipOut) throws IOException { final BufferedOutputStream bufferedOutput = new BufferedOutputStream(zipOut); ZipEntry _zipEntry = new ZipEntry("emf-contents"); zipOut.putNextEntry(_zipEntry); try { this.writeConte...
java
@Override public String getInputToParse(String completeInput, int offset, int completionOffset) { int fixedOffset = getOffsetIncludingWhitespace(completeInput, offset, Math.min(completeInput.length(), completionOffset)); return super.getInputToParse(completeInput, fixedOffset, completionOffset); }
java
@Override protected void doLinking() { IParseResult parseResult = getParseResult(); if (parseResult == null || parseResult.getRootASTElement() == null) return; XtextLinker castedLinker = (XtextLinker) getLinker(); castedLinker.discardGeneratedPackages(parseResult.getRootASTElement()); }
java
public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) { final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet); adapter.sourceLevelURIs = uris; }
java
public void setFileExtensions(final String fileExtensions) { this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split("\\s*,\\s*")))); }
java
public static String compactDump(INode node, boolean showHidden) { StringBuilder result = new StringBuilder(); try { compactDump(node, showHidden, "", result); } catch (IOException e) { return e.getMessage(); } return result.toString(); }
java
public static String getTokenText(INode node) { if (node instanceof ILeafNode) return ((ILeafNode) node).getText(); else { StringBuilder builder = new StringBuilder(Math.max(node.getTotalLength(), 1)); boolean hiddenSeen = false; for (ILeafNode leaf : node.getLeafNodes()) { if (!leaf.isHidden()) { ...
java
public List<List<String>> getAllScopes() { this.checkInitialized(); final ImmutableList.Builder<List<String>> builder = ImmutableList.<List<String>>builder(); final Consumer<Integer> _function = (Integer it) -> { List<String> _get = this.scopes.get(it); StringConcatenation _builder = new StringC...
java
public void addRequiredBundles(Set<String> requiredBundles) { addRequiredBundles(requiredBundles.toArray(new String[requiredBundles.size()])); }
java
public void addRequiredBundles(String... requiredBundles) { String oldBundles = mainAttributes.get(REQUIRE_BUNDLE); if (oldBundles == null) oldBundles = ""; BundleList oldResultList = BundleList.fromInput(oldBundles, newline); BundleList resultList = BundleList.fromInput(oldBundles, newline); for (String b...
java
public void addImportedPackages(Set<String> importedPackages) { addImportedPackages(importedPackages.toArray(new String[importedPackages.size()])); }
java
public void addImportedPackages(String... importedPackages) { String oldBundles = mainAttributes.get(IMPORT_PACKAGE); if (oldBundles == null) oldBundles = ""; BundleList oldResultList = BundleList.fromInput(oldBundles, newline); BundleList resultList = BundleList.fromInput(oldBundles, newline); for (String...
java
public void addExportedPackages(Set<String> exportedPackages) { addExportedPackages(exportedPackages.toArray(new String[exportedPackages.size()])); }
java
public void addExportedPackages(String... exportedPackages) { String oldBundles = mainAttributes.get(EXPORT_PACKAGE); if (oldBundles == null) oldBundles = ""; BundleList oldResultList = BundleList.fromInput(oldBundles, newline); BundleList resultList = BundleList.fromInput(oldBundles, newline); for (String...
java
public void setBREE(String bree) { String old = mainAttributes.get(BUNDLE_REQUIREDEXECUTIONENVIRONMENT); if (!bree.equals(old)) { this.mainAttributes.put(BUNDLE_REQUIREDEXECUTIONENVIRONMENT, bree); this.modified = true; this.bree = bree; } }
java
public void setBundleActivator(String bundleActivator) { String old = mainAttributes.get(BUNDLE_ACTIVATOR); if (!bundleActivator.equals(old)) { this.mainAttributes.put(BUNDLE_ACTIVATOR, bundleActivator); this.modified = true; this.bundleActivator = bundleActivator; } }
java
public static String make512Safe(StringBuffer input, String newline) { StringBuilder result = new StringBuilder(); String content = input.toString(); String rest = content; while (!rest.isEmpty()) { if (rest.contains("\n")) { String line = rest.substring(0, rest.indexOf("\n")); rest = rest.substring(...
java
protected void _format(EObject obj, IFormattableDocument document) { for (EObject child : obj.eContents()) document.format(child); }
java
public <Result> Result process(IUnitOfWork<Result, State> work) { releaseReadLock(); acquireWriteLock(); try { if (log.isTraceEnabled()) log.trace("process - " + Thread.currentThread().getName()); return modify(work); } finally { if (log.isTraceEnabled()) log.trace("Downgrading from write lock ...
java
protected EObject forceCreateModelElementAndSet(Action action, EObject value) { EObject result = semanticModelBuilder.create(action.getType().getClassifier()); semanticModelBuilder.set(result, action.getFeature(), value, null /* ParserRule */, currentNode); insertCompositeNode(action); associateNode...
java
public String stripUnnecessaryComments(String javaContent, AntlrOptions options) { if (!options.isOptimizeCodeQuality()) { return javaContent; } javaContent = stripMachineDependentPaths(javaContent); if (options.isStripAllComments()) { javaContent = stripAllComments(javaContent); } return javaContent;...
java
public String getPrefix(INode prefixNode) { if (prefixNode instanceof ILeafNode) { if (((ILeafNode) prefixNode).isHidden() && prefixNode.getGrammarElement() != null) return ""; return getNodeTextUpToCompletionOffset(prefixNode); } StringBuilder result = new StringBuilder(prefixNode.getTotalLength()); ...
java
public String toUriString(final java.net.URI uri) { return this.toUriString(URI.createURI(uri.normalize().toString())); }
java
public boolean hasCachedValue(Key key) { try { readLock.lock(); return content.containsKey(key); } finally { readLock.unlock(); } }
java
protected void loadEntries(final StorageAwareResource resource, final ZipInputStream zipIn) throws IOException { zipIn.getNextEntry(); BufferedInputStream _bufferedInputStream = new BufferedInputStream(zipIn); this.readContents(resource, _bufferedInputStream); zipIn.getNextEntry(); BufferedInputStre...
java
public final Iterator<AbstractTraceRegion> leafIterator() { if (nestedRegions == null) return Collections.<AbstractTraceRegion> singleton(this).iterator(); return new LeafIterator(this); }
java
public void generateTracedFile(final IFileSystemAccess2 fsa, final String path, final EObject rootTrace, final StringConcatenationClient code) { final CompositeGeneratorNode node = this.trace(rootTrace, code); this.generateTracedFile(fsa, path, node); }
java
public void generateTracedFile(final IFileSystemAccess2 fsa, final String path, final CompositeGeneratorNode rootNode) { final GeneratorNodeProcessor.Result result = this.processor.process(rootNode); fsa.generateFile(path, result); }
java
public void propagateAsErrorIfCancelException(final Throwable t) { if ((t instanceof OperationCanceledError)) { throw ((OperationCanceledError)t); } final RuntimeException opCanceledException = this.getPlatformOperationCanceledException(t); if ((opCanceledException != null)) { throw new Oper...
java
public void propagateIfCancelException(final Throwable t) { final RuntimeException cancelException = this.getPlatformOperationCanceledException(t); if ((cancelException != null)) { throw cancelException; } }
java
public Triple<EObject, EReference, INode> decode(Resource res, String uriFragment) { if (isUseIndexFragment(res)) { return getLazyProxyInformation(res, uriFragment); } List<String> split = Strings.split(uriFragment, SEP); EObject source = resolveShortFragment(res, split.get(1)); EReference ref = fromShortE...
java
@Override public <T> T get(Object key, Resource resource, Provider<T> provider) { if(resource == null) { return provider.get(); } CacheAdapter adapter = getOrCreate(resource); T element = adapter.<T>internalGet(key); if (element==null) { element = provider.get(); cacheMiss(adapter); adapter.set(k...
java
public <Result, Param extends Resource> Result execWithoutCacheClear(Param resource, IUnitOfWork<Result, Param> transaction) throws WrappedException { CacheAdapter cacheAdapter = getOrCreate(resource); try { cacheAdapter.ignoreNotifications(); return transaction.exec(resource); } catch (RuntimeException e) ...
java
public <Result, Param extends Resource> Result execWithTemporaryCaching(Param resource, IUnitOfWork<Result, Param> transaction) throws WrappedException { CacheAdapter cacheAdapter = getOrCreate(resource); IgnoreValuesMemento memento = cacheAdapter.ignoreNewValues(); try { return transaction.exec(resource); }...
java
public void resolveLazyCrossReferences(final CancelIndicator mon) { final CancelIndicator monitor = mon == null ? CancelIndicator.NullImpl : mon; TreeIterator<Object> iterator = EcoreUtil.getAllContents(this, true); while (iterator.hasNext()) { operationCanceledManager.checkCanceled(monitor); InternalEObjec...
java
public Set<URI> collectOutgoingReferences(IResourceDescription description) { URI resourceURI = description.getURI(); Set<URI> result = null; for(IReferenceDescription reference: description.getReferenceDescriptions()) { URI targetResource = reference.getTargetEObjectUri().trimFragment(); if (!resourceURI.e...
java
@Override public void write(final char[] cbuf, final int off, final int len) throws IOException { int offset = off; int length = len; while (suppressLineCount > 0 && length > 0) { length = -1; for (int i = 0; i < len && suppressLineCount > 0; i++) { if (cbuf[off + i] == '\n') { offset = off + i + ...
java
@Inject(optional = true) protected Pattern setEndTag(@Named(AbstractMultiLineCommentProvider.END_TAG) final String endTag) { return this.endTagPattern = Pattern.compile((endTag + "\\z")); }
java
public CompositeGeneratorNode indent(final CompositeGeneratorNode parent, final String indentString) { final IndentNode indent = new IndentNode(indentString); List<IGeneratorNode> _children = parent.getChildren(); _children.add(indent); return indent; }
java
public CompositeGeneratorNode appendNewLineIfNotEmpty(final CompositeGeneratorNode parent) { List<IGeneratorNode> _children = parent.getChildren(); String _lineDelimiter = this.wsConfig.getLineDelimiter(); NewLineNode _newLineNode = new NewLineNode(_lineDelimiter, true); _children.add(_newLineNode); ...
java
public CompositeGeneratorNode appendTemplate(final CompositeGeneratorNode parent, final StringConcatenationClient templateString) { final TemplateNode proc = new TemplateNode(templateString, this); List<IGeneratorNode> _children = parent.getChildren(); _children.add(proc); return parent; }
java
protected void doSplitTokenImpl(Token token, ITokenAcceptor result) { String text = token.getText(); int indentation = computeIndentation(text); if (indentation == -1 || indentation == currentIndentation) { // no change of indentation level detected simply process the token result.accept(token); } else if...
java
@Override public ResourceStorageLoadable getOrCreateResourceStorageLoadable(final StorageAwareResource resource) { try { final ResourceStorageProviderAdapter stateProvider = IterableExtensions.<ResourceStorageProviderAdapter>head(Iterables.<ResourceStorageProviderAdapter>filter(resource.getResourceSet().eAd...
java
public INode getLastCompleteNodeByOffset(INode node, int offsetPosition, int completionOffset) { return internalGetLastCompleteNodeByOffset(node.getRootNode(), offsetPosition); }
java
public void addRequiredBundles(Set<String> bundles) { // TODO manage transitive dependencies // don't require self Set<String> bundlesToMerge; String bundleName = (String) getMainAttributes().get(BUNDLE_SYMBOLIC_NAME); if (bundleName != null) { int idx = bundleName.indexOf(';'); if (idx >= 0) { bund...
java
public void addExportedPackages(Set<String> packages) { String s = (String) getMainAttributes().get(EXPORT_PACKAGE); Wrapper<Boolean> modified = Wrapper.wrap(this.modified); String result = mergeIntoCommaSeparatedList(s, packages, modified, lineDelimiter); this.modified = modified.get(); getMainAttributes().p...
java
public void createProposals(final Collection<ContentAssistContext> contexts, final IIdeContentProposalAcceptor acceptor) { Iterable<ContentAssistContext> _filteredContexts = this.getFilteredContexts(contexts); for (final ContentAssistContext context : _filteredContexts) { ImmutableList<AbstractElement> _f...
java
public String convertFromJavaString(String string, boolean useUnicode) { int firstEscapeSequence = string.indexOf('\\'); if (firstEscapeSequence == -1) { return string; } int length = string.length(); StringBuilder result = new StringBuilder(length); appendRegion(string, 0, firstEscapeSequence, result); ...
java
public String convertToJavaString(String input, boolean useUnicode) { int length = input.length(); StringBuilder result = new StringBuilder(length + 4); for (int i = 0; i < length; i++) { escapeAndAppendTo(input.charAt(i), useUnicode, result); } return result.toString(); }
java
private void performDownload(HttpResponse response, File destFile) throws IOException { HttpEntity entity = response.getEntity(); if (entity == null) { return; } //get content length long contentLength = entity.getContentLength(); if (cont...
java
private void stream(InputStream is, File destFile) throws IOException { try { startProgress(); OutputStream os = new FileOutputStream(destFile); boolean finished = false; try { byte[] buf = new byte[1024 * 10]; int read...
java
private String getCachedETag(HttpHost host, String file) { Map<String, Object> cachedETags = readCachedETags(); @SuppressWarnings("unchecked") Map<String, Object> hostMap = (Map<String, Object>)cachedETags.get(host.toURI()); if (hostMap == null) { return null...
java
private File makeDestFile(URL src) { if (dest == null) { throw new IllegalArgumentException("Please provide a download destination"); } File destFile = dest; if (destFile.isDirectory()) { //guess name from URL String name = src.toString(); ...
java
private void addAuthentication(HttpHost host, Credentials credentials, AuthScheme authScheme, HttpClientContext context) { AuthCache authCache = context.getAuthCache(); if (authCache == null) { authCache = new BasicAuthCache(); context.setAuthCache(authCache); ...
java
private String toLengthText(long bytes) { if (bytes < 1024) { return bytes + " B"; } else if (bytes < 1024 * 1024) { return (bytes / 1024) + " KB"; } else if (bytes < 1024 * 1024 * 1024) { return String.format("%.2f MB", bytes / (1024.0 * 1024.0)); } e...
java
public void close() throws IOException { for (CloseableHttpClient c : cachedClients.values()) { c.close(); } cachedClients.clear(); }
java
public static Provider getCurrentProvider(boolean useSwingEventQueue) { Provider provider; if (Platform.isX11()) { provider = new X11Provider(); } else if (Platform.isWindows()) { provider = new WindowsProvider(); } else if (Platform.isMac()) { provide...
java
protected void fireEvent(HotKey hotKey) { HotKeyEvent event = new HotKeyEvent(hotKey); if (useSwingEventQueue) { SwingUtilities.invokeLater(event); } else { if (eventQueue == null) { eventQueue = Executors.newSingleThreadExecutor(); } ...
java
public Object newInstance(String resource) { try { String name = resource.startsWith("/") ? resource : "/" + resource; File file = new File(this.getClass().getResource(name).toURI()); return newInstance(classLoader.parseClass(new GroovyCodeSource(file), true)); } catc...
java