Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
57,600
void () { doTest(); }
testPrimitiveCoercing
57,601
void () { myFixture.testHighlighting(false, false, false, getTestName(true) + ".fxml"); }
doTest
57,602
void () { myFixture.enableInspections(new XmlPathReferenceInspection(), new RequiredAttributesInspection(), new UnusedDeclarationInspection()); }
enableInspections
57,603
String () { return PluginPathManager.getPluginHomePath("javaFX") + "/testData/coercing/"; }
getTestDataPath
57,604
void (String[] args) { if (args.length == 1 && "-fromSource".equals(args[0])) { scanSource(); } else { launch(args); } }
main
57,605
void (Stage primaryStage) { Button b = new Button(); b.setText("Generate"); b.setOnAction(event -> generate()); StackPane pane = new StackPane(); pane.getChildren().add(b); primaryStage.setScene(new Scene(pane, 300, 200)); primaryStage.show(); Platform.runLater(() -> { generate(); primaryStage.close(); }); }
start
57,606
void () { System.out.println("--- JavaFX default property values ---"); final Map<String, Map<String, DefaultValue>> defaultPropertyValues = new TreeMap<>(); final Map<String, Map<String, String>> declaredProperties = new TreeMap<>(); final Map<String, Map<String, Set<String>>> overriddenProperties = new TreeMap<>(); f...
generate
57,607
Iterator<String> () { return names.iterator(); }
iterator
57,608
Type (String name) { final Set<Type> typeSet = types.get(name); if (typeSet != null && typeSet.size() == 1) { return typeSet.iterator().next(); } return null; }
getType
57,609
Object (String name) { final Set<Object> valueSet = values.get(name); if (valueSet != null && valueSet.size() == 1) { return valueSet.iterator().next(); } return null; }
getValue
57,610
boolean (DefaultValue first, DefaultValue second) { return second.getValueText().equals(first.getValueText()); }
areValuesEqual
57,611
boolean (Class<?> propertyClass) { return propertyClass.isPrimitive() || propertyClass.isEnum() || Number.class.isAssignableFrom(propertyClass) || Boolean.class.isAssignableFrom(propertyClass) || Character.class.isAssignableFrom(propertyClass) || CharSequence.class.isAssignableFrom(propertyClass); }
isSupportedPropertyType
57,612
Object (Class<?> aClass) { try { if (Modifier.isAbstract(aClass.getModifiers())) return null; final Constructor<?> constructor; try { constructor = aClass.getConstructor(); } catch (NoSuchMethodException e) { return null; } constructor.setAccessible(true); return constructor.newInstance(); } catch (InstantiationExcepti...
instantiate
57,613
void () { Pattern defaultValueJavaDoc = Pattern.compile("^.*\\*\\s*@defaultValue\\s*(.+)\\s*$"); Pattern fieldDecl = Pattern.compile("^.*\\s(\\w+)\\s*(=.*|;)\\s*$"); Pattern methodDecl = Pattern.compile("^.*\\s(\\w+)\\s*\\(\\).*$"); Pattern propertyDecl = Pattern.compile("^.*Property\\S*\\s+(\\w+)\\s*=\\s*(.+)[;{].*$")...
scanSource
57,614
String () { return myDeclaringClass; }
getDeclaringClass
57,615
String () { return myValueText; }
getValueText
57,616
String () { return myValueText; }
toString
57,617
void () { doTest(""" <fx:fileset id="all_but_jarDeployNoInfo" dir="temp" includes="**/*.jar"> <exclude name="jarDeployNoInfo.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployNoInfo" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployNoInfo_id" name="jarDeployNoInfo" mainClass="Main"> ...
testJarDeployNoInfo
57,618
void () { doTest(""" <fx:fileset id="all_but_jarDeployTitle" dir="temp" includes="**/*.jar"> <exclude name="jarDeployTitle.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployTitle" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployTitle_id" name="jarDeployTitle" mainClass="Main"> </fx:...
testJarDeployTitle
57,619
void () { doTest(""" <fx:fileset id="all_but_jarDeployIcon" dir="temp" includes="**/*.jar"> <exclude name="jarDeployIcon.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployIcon" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployIcon_id" name="jarDeployIcon" mainClass="Main"> </fx:appli...
testJarDeployIcon
57,620
void () { doTest(""" <fx:fileset id="all_but_jarDeployIconAbsolute" dir="temp" includes="**/*.jar"> <exclude name="jarDeployIconAbsolute.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployIconAbsolute" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployIconAbsolute_id" name="jarDeployIc...
testJarDeployIconAbsolute
57,621
void () { doTest(""" <fx:fileset id="all_but_jarDeployVersion" dir="temp" includes="**/*.jar"> <exclude name="jarDeployVersion.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployVersion" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployVersion_id" name="jarDeployVersion" mainClass="Ma...
testJarDeployVersion
57,622
void () { doTest(""" <fx:fileset id="all_but_jarDeployTemplate" dir="temp" includes="**/*.jar"> <exclude name="jarDeployTemplate.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployTemplate" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployTemplate_id" name="jarDeployTemplate" mainClas...
testJarDeployTemplate
57,623
void () { doTest(""" <fx:fileset id="all_but_jarDeploySigned" dir="temp" includes="**/*.jar"> <exclude name="jarDeploySigned.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeploySigned" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeploySigned_id" name="jarDeploySigned" mainClass="Main"> ...
testJarDeploySigned
57,624
void () { final HashMap<String, String> options = new HashMap<>(); options.put(PRELOADER_CLASS, "MyPreloader"); options.put(PRELOADER_JAR, "preloader.jar"); doTest(""" <fx:fileset id="jarDeployPreloader_preloader_files" requiredFor="preloader" dir="temp" includes="preloader.jar"> </fx:fileset> <fx:fileset id="all_but_p...
testJarDeployPreloader
57,625
void () { doTest(""" <fx:fileset id="all_but_jarDeployVerbose" dir="temp" includes="**/*.jar"> <exclude name="jarDeployVerbose.jar"> </exclude> </fx:fileset> <fx:fileset id="all_jarDeployVerbose" dir="temp" includes="**/*.jar"> </fx:fileset> <fx:application id="jarDeployVerbose_id" name="jarDeployVerbose" mainClass="Ma...
testJarDeployVerbose
57,626
void (final String expected, Map<String, String> options) { final String artifactName = UsefulTestCase.getTestName(getName(), true); final String artifactFileName = artifactName + ".jar"; final MockJavaFxPackager packager = new MockJavaFxPackager(artifactName + "/" + artifactFileName); final String title = options.get(...
doTest
57,627
void (String title) { myTitle = title; }
setTitle
57,628
void (String vendor) { myVendor = vendor; }
setVendor
57,629
void (String description) { myDescription = description; }
setDescription
57,630
void (String version) { myVersion = version; }
setVersion
57,631
void (String htmlTemplate) { myHtmlTemplate = htmlTemplate; }
setHtmlTemplate
57,632
void (String htmlPlaceholderId) { myHtmlPlaceholderId = htmlPlaceholderId; }
setHtmlPlaceholderId
57,633
void (String htmlParams) { myHtmlParams = htmlParams; }
setHtmlParams
57,634
void (String params) { myParams = params; }
setParams
57,635
void (String preloaderClass) { myPreloaderClass = preloaderClass; }
setPreloaderClass
57,636
void (String preloaderJar) { myPreloaderJar = preloaderJar; }
setPreloaderJar
57,637
void (boolean signed) { mySigned = signed; }
setSigned
57,638
void (JavaFxApplicationIcons icons) { myIcons = icons; }
setIcons
57,639
void (JavaFxPackagerConstants.NativeBundles nativeBundle) { myNativeBundle = nativeBundle; }
setNativeBundle
57,640
void (JavaFxPackagerConstants.MsgOutputLevel msgOutputLevel) { myMsgOutputLevel = msgOutputLevel; }
setMsgOutputLevel
57,641
String () { return getArtifactRootName(); }
getArtifactName
57,642
String () { return new File(myOutputPath).getParent(); }
getArtifactOutputPath
57,643
String () { return myOutputPath; }
getArtifactOutputFilePath
57,644
String () { return "Main"; }
getAppClass
57,645
String () { return myTitle; }
getTitle
57,646
String () { return myVendor; }
getVendor
57,647
String () { return myDescription; }
getDescription
57,648
String () { return myVersion; }
getVersion
57,649
String () { return "800"; }
getWidth
57,650
String () { return "400"; }
getHeight
57,651
String () { return myHtmlTemplate; }
getHtmlTemplateFile
57,652
String () { return myHtmlPlaceholderId; }
getHtmlPlaceholderId
57,653
String () { return myHtmlParams; }
getHtmlParamFile
57,654
String () { return myParams; }
getParamFile
57,655
String () { return JavaFxPackagerConstants.UPDATE_MODE_BACKGROUND; }
getUpdateMode
57,656
void (String message) { }
registerJavaFxPackagerError
57,657
void (String message) { }
registerJavaFxPackagerInfo
57,658
String () { return null; }
getKeypass
57,659
String () { return null; }
getStorepass
57,660
String () { return null; }
getKeystore
57,661
String () { return null; }
getAlias
57,662
boolean () { return true; }
isSelfSigning
57,663
boolean () { return mySigned; }
isEnabledSigning
57,664
String () { return myPreloaderClass; }
getPreloaderClass
57,665
String () { return myPreloaderJar; }
getPreloaderJar
57,666
boolean () { return myConvertCss2Bin; }
convertCss2Bin
57,667
List<JavaFxManifestAttribute> () { return myCustomManifestAttributes; }
getCustomManifestAttributes
57,668
JavaFxApplicationIcons () { return myIcons; }
getIcons
57,669
boolean () { return this == all || this == deb || this == rpm; }
isOnLinux
57,670
boolean () { return this == all || this == dmg; }
isOnMac
57,671
boolean () { return this == all || this == exe || this == msi; }
isOnWindows
57,672
String () { return myCmdLineParam; }
getCmdLineParam
57,673
boolean () { return myIsVerbose; }
isVerbose
57,674
String () { return PathUtilRt.getFileName(getArtifactOutputFilePath()); }
getArtifactRootName
57,675
void (final String homePath) { if (!checkNotEmpty(getAppClass(), "Application class")) return; if (!checkNotEmpty(getWidth(), "Width")) return; if (!checkNotEmpty(getHeight(), "Height")) return; final String zipPath = getArtifactOutputFilePath(); final File tempUnzippedArtifactOutput; try { tempUnzippedArtifactOutput =...
buildJavaFxArtifact
57,676
boolean (final String text, final String title) { if (StringUtil.isEmptyOrSpaces(text)) { registerJavaFxPackagerError(JavaFXCommonBundle.message("unable.to.build.javafx.artifact.not.specified", title)); return false; } return true; }
checkNotEmpty
57,677
void (String binPath, File tempDirectory) { final boolean selfSigning = isSelfSigning(); final int genResult = selfSigning ? genKey(binPath) : 0; if (genResult == 0) { final File[] files = tempDirectory.listFiles(); if (files != null) { for (File file : files) { if (file.isFile() && file.getName().endsWith(".jar")) { s...
signApp
57,678
void (String binPath, boolean selfSigning, final String jar2Sign) { final List<String> signCommandLine = new ArrayList<>(); addParameter(signCommandLine, FileUtil.toSystemDependentName(binPath + File.separator + "jarsigner")); collectStoreParams(selfSigning, signCommandLine); addParameter(signCommandLine, jar2Sign); ad...
sign
57,679
int (String binPath) { final String keyStorePath = getKeystore(true); final File keyStoreFile = new File(keyStorePath); if (keyStoreFile.isFile()) { FileUtil.delete(keyStoreFile); } final List<String> genCommandLine = new ArrayList<>(); addParameter(genCommandLine, FileUtil.toSystemDependentName(binPath + File.separato...
genKey
57,680
void (boolean selfSigning, List<String> signCommandLine) { addParameter(signCommandLine, "-keyStore"); addParameter(signCommandLine, getKeystore(selfSigning)); addParameter(signCommandLine, "-storepass"); addParameter(signCommandLine, getStorepass(selfSigning)); addParameter(signCommandLine, "-keypass"); addParameter(s...
collectStoreParams
57,681
void (final File tempDirectory) { try { final File resultedJar = new File(getArtifactOutputPath()); FileUtil.copyDir(tempDirectory, resultedJar); } catch (IOException e) { LOG.info(e); } FileUtil.delete(tempDirectory); }
copyResultsToArtifactsOutput
57,682
void (Exception ex) { registerJavaFxPackagerError(ex.getMessage()); }
registerJavaFxPackagerError
57,683
void (List<String> commandLine, String param) { if (!StringUtil.isEmptyOrSpaces(param)) { commandLine.add(param); } }
addParameter
57,684
int (List<String> commands) { try { final AtomicInteger exitCode = new AtomicInteger(); final @NlsSafe StringBuilder errorOutput = new StringBuilder(); final List<@NlsSafe String> delayedInfoOutput = new ArrayList<>(); boolean isVerbose = getMsgOutputLevel() != null && getMsgOutputLevel().isVerbose(); final Process pro...
startProcess
57,685
void (@NotNull ProcessEvent event) { if (isVerbose) { LOG.info("Started " + commands); } }
startNotified
57,686
void (@NotNull ProcessEvent event) { if (isVerbose) { LOG.info("Terminated " + commands + ", exit code: " + event.getExitCode()); } exitCode.set(event.getExitCode()); }
processTerminated
57,687
void (@NotNull ProcessEvent event, @NotNull Key outputType) { String message = StringUtil.trimTrailing(event.getText()); if (outputType == ProcessOutputTypes.STDERR) { LOG.error(message, (Throwable)null); errorOutput.append(event.getText()); } else { LOG.info(message); if (isVerbose) { registerJavaFxPackagerInfo(messag...
onTextAvailable
57,688
int (String buildText, String javaHome) { final String antHome = getAntHome(); if (antHome == null) { registerJavaFxPackagerError(JavaFXCommonBundle.message("bundled.ant.not.found")); return -1; } final ArrayList<String> commands = new ArrayList<>(); commands.add(javaHome + File.separator + "bin" + File.separator + "ja...
startAntTarget
57,689
String () { final String appHome = PathManager.getHomePath(); File antHome = new File(appHome, "lib" + File.separator + "ant"); if (!antHome.exists()) { File communityAntHome = new File(appHome, "community" + File.separator + "lib" + File.separator + "ant"); if (communityAntHome.exists()) { antHome = communityAntHome; ...
getAntHome
57,690
String (boolean selfSigning) { return selfSigning ? "jb" : getAlias(); }
getAlias
57,691
String (boolean selfSigning) { return selfSigning ? "keypass" : new String(Base64.getDecoder().decode(getKeypass()), StandardCharsets.UTF_8); }
getKeypass
57,692
String (boolean selfSigning) { return selfSigning ? getArtifactOutputPath() + File.separator + JB_JFX_JKS : getKeystore(); }
getKeystore
57,693
String (boolean selfSigning) { return selfSigning ? "storepass" : new String(Base64.getDecoder().decode(getStorepass()), StandardCharsets.UTF_8); }
getStorepass
57,694
List<SimpleTag> (AbstractJavaFxPackager packager, String artifactFileName, String artifactName, String tempDirPath, String tempDirDeployPath, String relativeToBaseDirPath) { final String artifactFileNameWithoutExtension = FileUtilRt.getNameWithoutExtension(artifactFileName); final List<SimpleTag> topLevelTagsCollector ...
createJarAndDeployTasks
57,695
void (SimpleTag tag, @NotNull AbstractJavaFxPackager packager) { JavaFxPackagerConstants.MsgOutputLevel msgOutputLevel = packager.getMsgOutputLevel(); if (msgOutputLevel != null && msgOutputLevel.isVerbose()) { tag.addAttribute(Couple.of("verbose", "true")); } }
addVerboseAttribute
57,696
List<JavaFxManifestAttribute> (@NotNull AbstractJavaFxPackager packager) { final List<JavaFxManifestAttribute> manifestAttributes = new ArrayList<>(); final String title = packager.getTitle(); if (title != null) { manifestAttributes.add(new JavaFxManifestAttribute("Implementation-Title", title)); } final String version...
getManifestAttributes
57,697
SimpleTag (List<SimpleTag> topLevelTagsCollector, JavaFxPackagerConstants.NativeBundles bundle, JavaFxApplicationIcons appIcons, String relativeToPath) { boolean haveAppIcon = false; if (appIcons == null || bundle == null || appIcons.isEmpty()) return null; if (bundle.isOnLinux()) { String iconPath = appIcons.getLinuxI...
appendApplicationIconPath
57,698
void (List<SimpleTag> tagsCollector, String iconPath, boolean isRelativeIconPath, SimpleTag osFamily) { final SimpleTag condition = new SimpleTag("condition", Couple.of("property", "app.icon.path"), Couple.of("value", isRelativeIconPath ? "${basedir}/" + iconPath : iconPath)); condition.add(osFamily); tagsCollector.add...
appendIconPropertyTag
57,699
SimpleTag (String preloaderFiles, boolean includeSelf, String allButPreloader, String allButSelf, String all) { final SimpleTag resourcesTag = new SimpleTag("fx:resources"); if (preloaderFiles != null) { resourcesTag.add(new SimpleTag("fx:fileset", Couple.of("refid", preloaderFiles))); resourcesTag.add(new SimpleTag("f...
createResourcesTag