From 17b50e73d1fe08f43873917eab330673b8cefed4 Mon Sep 17 00:00:00 2001 From: MorellThomas Date: Wed, 22 May 2024 13:36:07 +0200 Subject: [PATCH] Rectanuglar selection changed to Mouse Button 3 drag --- .gitignore | 3 + build.diff | 142 +++++++++++++---------------- build.gradle | 149 +++++++++++++++++-------------- src/jalview/gui/CalculationChooser.java | 2 +- src/jalview/gui/RotatableCanvas.java | 12 ++- 5 files changed, 159 insertions(+), 149 deletions(-) diff --git a/.gitignore b/.gitignore index 4a81616..2b5afa3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,11 +13,14 @@ .DS_Store /.com.apple.timemachine.supported .gitattributes +.gitignore TESTNG /jalviewApplet.jar /benchmarking/lib *.class *.patch +*.diff +*.orig /site /site-resources /libjs diff --git a/build.diff b/build.diff index 8dc92f7..313b266 100644 --- a/build.diff +++ b/build.diff @@ -1,17 +1,17 @@ ---- build.gradle 2023-07-02 09:21:09.216542293 +0200 -+++ ../jalview_new/build.gradle 2023-05-15 19:20:46.892861180 +0200 -@@ -45,8 +45,8 @@ +--- build.gradle.orig 2024-05-22 09:14:54.544344630 +0200 ++++ build.gradle 2024-05-22 09:45:40.809642258 +0200 +@@ -51,8 +51,8 @@ id 'java' id 'application' id 'eclipse' - id "com.diffplug.gradle.spotless" version "3.28.0" -- id 'com.github.johnrengelman.shadow' version '4.0.3' -+ id "com.diffplug.spotless" version "6.18.0" //.gradle.spotless" "3.28.0" -+ id 'com.github.johnrengelman.shadow' version '8.1.1' // was 4.0.3 - id 'com.install4j.gradle' version '9.0.6' - id 'com.dorongold.task-tree' version '2.1.0' // only needed to display task dependency tree with gradle task1 [task2 ...] taskTree +- id 'com.github.johnrengelman.shadow' version '6.0.0' ++ id "com.diffplug.spotless" version "6.18.0" ++ id 'com.github.johnrengelman.shadow' version '8.1.1' + id 'com.install4j.gradle' version '10.0.3' + id 'com.dorongold.task-tree' version '2.1.1' // only needed to display task dependency tree with gradle task1 [task2 ...] taskTree id 'com.palantir.git-version' version '0.13.0' apply false -@@ -183,6 +183,7 @@ +@@ -193,6 +193,7 @@ testDir = string("${jalviewDir}/${bareTestSourceDir}") classesDir = string("${jalviewDir}/${classes_dir}") @@ -19,7 +19,7 @@ // clover useClover = clover.equals("true") -@@ -547,14 +548,14 @@ +@@ -590,14 +591,14 @@ main { java { srcDirs sourceDir @@ -36,7 +36,7 @@ compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"]) runtimeClasspath = compileClasspath -@@ -564,14 +565,14 @@ +@@ -607,14 +608,14 @@ clover { java { srcDirs cloverInstrDir @@ -53,7 +53,7 @@ //compileClasspath += files( testClassesDir ) compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"]) compileClasspath += fileTree(dir: "${jalviewDir}/${clover_lib_dir}", include: ["*.jar"]) -@@ -583,14 +584,14 @@ +@@ -626,14 +627,14 @@ test { java { srcDirs testSourceDir @@ -70,7 +70,7 @@ compileClasspath += useClover ? sourceSets.clover.compileClasspath : sourceSets.main.compileClasspath compileClasspath += fileTree(dir: "${jalviewDir}/${utils_dir}/testnglibs", include: ["**/*.jar"]) -@@ -615,7 +616,7 @@ +@@ -658,7 +659,7 @@ } classpath { @@ -79,7 +79,7 @@ configurations.each{ c-> if (c.isCanBeResolved()) { minusConfigurations += [c] -@@ -654,7 +655,7 @@ +@@ -697,7 +698,7 @@ HashMap alreadyAddedLibPath = new HashMap<>(); sourceSets.main.compileClasspath.findAll { it.name.endsWith(".jar") }.any { @@ -88,7 +88,7 @@ if (it.isDirectory() || ! it.exists()) { // don't add dirs to classpath, especially if they don't exist return false // groovy "continue" in .any closure -@@ -674,7 +675,7 @@ +@@ -717,7 +718,7 @@ } sourceSets.test.compileClasspath.findAll { it.name.endsWith(".jar") }.any { @@ -97,7 +97,7 @@ if (it.isDirectory() || ! it.exists()) { // don't add dirs to classpath return false // groovy "continue" in .any closure -@@ -1051,7 +1052,7 @@ +@@ -1094,7 +1095,7 @@ clean { doFirst { @@ -106,7 +106,7 @@ } } -@@ -1059,7 +1060,7 @@ +@@ -1102,7 +1103,7 @@ cleanTest { dependsOn cleanClover doFirst { @@ -115,7 +115,7 @@ } } -@@ -1151,7 +1152,7 @@ +@@ -1194,7 +1195,7 @@ task copyDocs(type: Copy) { def inputDir = "${jalviewDir}/${doc_dir}" @@ -124,7 +124,7 @@ from(inputDir) { include('**/*.txt') include('**/*.md') -@@ -1172,10 +1173,10 @@ +@@ -1215,10 +1216,10 @@ exclude('**/*.html') exclude('**/*.xml') } @@ -137,7 +137,7 @@ } -@@ -1240,15 +1241,15 @@ +@@ -1283,15 +1284,15 @@ } if (inFrontMatter) { def m = null @@ -158,7 +158,7 @@ map[ m[0][1] ] = m[0][2] } if (dateOnly && map["date"] != null) { -@@ -1307,7 +1308,7 @@ +@@ -1350,7 +1351,7 @@ def inSection = false changes.eachLine { line -> def m = null @@ -167,7 +167,7 @@ if (inSection) { changesHugo += "\n\n" } -@@ -1317,7 +1318,7 @@ +@@ -1360,7 +1361,7 @@ section = section.replaceAll(/[^a-z0-9_\-]/, "") changesHugo += "
\n\n" inSection = true @@ -176,7 +176,7 @@ def comment = m[0][2].trim() if (comment != "") { comment = comment.replaceAll('"', """) -@@ -1387,7 +1388,7 @@ +@@ -1430,7 +1431,7 @@ def sectionName = null content.eachLine { line -> def m = null @@ -185,7 +185,7 @@ if (sectionName != null) { sections[sectionName] = sectionContent sectionName = null -@@ -1410,7 +1411,7 @@ +@@ -1453,7 +1454,7 @@ task copyHelp(type: Copy) { def inputDir = helpSourceDir @@ -194,7 +194,7 @@ from(inputDir) { include('**/*.txt') include('**/*.md') -@@ -1435,14 +1436,15 @@ +@@ -1478,14 +1479,15 @@ exclude('**/*.xml') exclude('**/*.jhm') } @@ -212,7 +212,7 @@ task releasesTemplates { group "help" description "Recreate whatsNew.html and releases.html from markdown files and templates in help" -@@ -1519,9 +1521,9 @@ +@@ -1562,9 +1564,9 @@ def lm = null def rContentProcessed = "" rContent.eachLine { line -> @@ -224,7 +224,7 @@ line = "_${lm[0][1].trim()}_" } rContentProcessed += line + "\n" -@@ -1579,13 +1581,14 @@ +@@ -1622,13 +1624,14 @@ outputs.file(whatsnewHtmlFile) } @@ -240,7 +240,7 @@ from(inputDir) { include('**/*.txt') include('**/*.md') -@@ -1606,10 +1609,10 @@ +@@ -1649,10 +1652,10 @@ exclude('**/*.html') exclude('**/*.xml') } @@ -253,20 +253,7 @@ } task copyChannelResources(type: Copy) { -@@ -1618,16 +1621,17 @@ - description = "Copy the channel resources dir to the build resources area" - - def inputDir = "${channelDir}/${resource_dir}" -- def outputDir = resourcesBuildDir -+ def destinationDirectory = resourcesBuildDir - from inputDir -- into outputDir -+ into destinationDirectory - - inputs.dir(inputDir) -- outputs.dir(outputDir) -+ outputs.dir(destinationDirectory) - } +@@ -1683,6 +1686,7 @@ task createBuildProperties(type: WriteProperties) { dependsOn copyResources @@ -274,7 +261,7 @@ group = "build" description = "Create the ${buildProperties} file" -@@ -1651,6 +1655,7 @@ +@@ -1706,6 +1710,7 @@ task buildIndices(type: JavaExec) { dependsOn copyHelp @@ -282,7 +269,7 @@ classpath = sourceSets.main.compileClasspath main = "com.sun.java.help.search.Indexer" workingDir = "${helpBuildDir}/${help_dir}" -@@ -1678,15 +1683,25 @@ +@@ -1733,7 +1738,7 @@ dependsOn buildResources dependsOn copyDocs dependsOn copyHelp @@ -291,33 +278,30 @@ dependsOn convertMdFiles dependsOn buildIndices } - - -+// random block of dependencies +@@ -1742,6 +1747,14 @@ compileJava.dependsOn prepare run.dependsOn compileJava - //run.dependsOn prepare -+compileTestJava.dependsOn compileJava // -+compileTestJava.dependsOn buildIndices // -+processResources.dependsOn copyChannelResources // -+processResources.dependsOn copyResources // -+processResources.dependsOn createBuildProperties // -+processResources.dependsOn copyDocs // -+processResources.dependsOn convertMdFiles // -+processResources.dependsOn copyHelp // -+processResources.dependsOn buildIndices // - - - //testReportDirName = "test-reports" // note that test workingDir will be $jalviewDir -@@ -1731,6 +1746,7 @@ - } + compileTestJava.dependsOn compileJava ++compileTestJava.dependsOn buildIndices ++processResources.dependsOn copyChannelResources ++processResources.dependsOn copyResources ++processResources.dependsOn createBuildProperties ++processResources.dependsOn copyDocs ++processResources.dependsOn convertMdFiles ++processResources.dependsOn copyHelp ++processResources.dependsOn buildIndices + + + +@@ -2037,6 +2050,7 @@ + /* END of test tasks results summary */ +/* task compileLinkCheck(type: JavaCompile) { options.fork = true classpath = files("${jalviewDir}/${utils_dir}") -@@ -1765,6 +1781,7 @@ +@@ -2071,6 +2085,7 @@ inputs.dir(helpBuildDir) outputs.file(helpLinksCheckerOutFile) } @@ -325,7 +309,7 @@ // import the pubhtmlhelp target -@@ -1779,10 +1796,14 @@ +@@ -2085,10 +2100,14 @@ } } @@ -341,7 +325,7 @@ manifest { attributes "Main-Class": main_class, -@@ -1792,8 +1813,8 @@ +@@ -2098,8 +2117,8 @@ "Implementation-Version": JALVIEW_VERSION } @@ -352,7 +336,7 @@ archiveFileName = rootProject.name+".jar" duplicatesStrategy "EXCLUDE" -@@ -1804,11 +1825,11 @@ +@@ -2110,11 +2129,11 @@ exclude "**/*.jar" exclude "**/*.jar.*" @@ -366,8 +350,8 @@ } -@@ -1867,7 +1888,7 @@ - +@@ -2207,7 +2226,7 @@ + // this mainClassName is mandatory but gets ignored due to manifest created in doFirst{}. Set the Main-Class as an attribute in launcherJar instead mainClassName = shadow_jar_main_class mergeServiceFiles() - classifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION @@ -375,7 +359,7 @@ minimize() } -@@ -2922,10 +2943,10 @@ +@@ -3388,10 +3407,10 @@ def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjs_eclipse_dropins_dir}", include: "*.jar") inputFiles += file("${jalviewDir}/${jalviewjsJ2sPlugin}") @@ -388,7 +372,7 @@ } -@@ -3033,13 +3054,13 @@ +@@ -3499,13 +3518,13 @@ dependsOn jalviewjsTransferUnzipAllLibs def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteLibDir}") inputFiles += fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}") @@ -405,7 +389,7 @@ null } preserve { -@@ -3058,13 +3079,13 @@ +@@ -3524,13 +3543,13 @@ dependsOn buildResources def inputFiles = fileTree(dir: resourcesBuildDir) @@ -422,7 +406,7 @@ null } preserve { -@@ -3077,13 +3098,13 @@ +@@ -3543,13 +3562,13 @@ task jalviewjsSyncSiteResources (type: Sync) { def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjs_site_resource_dir}") @@ -439,7 +423,7 @@ null } preserve { -@@ -3097,13 +3118,13 @@ +@@ -3563,13 +3582,13 @@ task jalviewjsSyncBuildProperties (type: Sync) { dependsOn createBuildProperties def inputFiles = [file(buildProperties)] @@ -456,7 +440,7 @@ null } preserve { -@@ -3322,7 +3343,7 @@ +@@ -3788,7 +3807,7 @@ def swingJ2sDir = "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}/${jalviewjs_j2s_subdir}" def libJ2sDir = "${jalviewDir}/${jalviewjsTransferSiteLibDir}/${jalviewjs_j2s_subdir}" def jsDir = "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}/${jalviewjs_js_subdir}" @@ -465,7 +449,7 @@ def prefixFile = "${jsDir}/core/coretop2.js" def suffixFile = "${jsDir}/core/corebottom2.js" -@@ -3366,8 +3387,8 @@ +@@ -3832,8 +3851,8 @@ } def list = fileTree(dir: j2sDir, includes: filelist) @@ -476,7 +460,7 @@ jalviewjsCoreClasslists += [ 'jsfile': jsfile, -@@ -3385,8 +3406,8 @@ +@@ -3851,8 +3870,8 @@ // _stevesoft core. add any cores without a classlist here (and the inputs and outputs) def stevesoftClasslistName = "_stevesoft" def stevesoftClasslist = [ @@ -487,7 +471,7 @@ 'list': fileTree(dir: j2sDir, include: "com/stevesoft/pat/**/*.js"), 'name': stevesoftClasslistName ] -@@ -3419,8 +3440,8 @@ +@@ -3885,8 +3904,8 @@ ] ) def allClasslist = [ @@ -498,7 +482,7 @@ 'list': allJsFiles, 'name': allClasslistName ] -@@ -3473,11 +3494,11 @@ +@@ -3939,11 +3958,11 @@ dependsOn jalviewjsBuildAllCores def inputFileName = "${jalviewDir}/${j2s_coretemplate_html}" def inputFile = file(inputFileName) @@ -512,7 +496,7 @@ cl['outputfile'] = outputFile outputFiles += outputFile } -@@ -3496,13 +3517,13 @@ +@@ -3962,13 +3981,13 @@ dependsOn jalviewjsBuildAllCores dependsOn jalviewjsPublishCoreTemplates def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteCoreDir}") diff --git a/build.gradle b/build.gradle index 6df3ec9..f89a53a 100644 --- a/build.gradle +++ b/build.gradle @@ -51,8 +51,8 @@ plugins { id 'java' id 'application' id 'eclipse' - id "com.diffplug.gradle.spotless" version "3.28.0" - id 'com.github.johnrengelman.shadow' version '6.0.0' + id "com.diffplug.spotless" version "6.18.0" + id 'com.github.johnrengelman.shadow' version '8.1.1' id 'com.install4j.gradle' version '10.0.3' id 'com.dorongold.task-tree' version '2.1.1' // only needed to display task dependency tree with gradle task1 [task2 ...] taskTree id 'com.palantir.git-version' version '0.13.0' apply false @@ -193,6 +193,7 @@ ext { testDir = string("${jalviewDir}/${bareTestSourceDir}") classesDir = string("${jalviewDir}/${classes_dir}") + destinationDirectory = file(classesDir) // clover useClover = clover.equals("true") @@ -590,14 +591,14 @@ sourceSets { main { java { srcDirs sourceDir - outputDir = file(classesDir) + destinationDirectory = file(classesDir) } resources { srcDirs = [ resourcesBuildDir, docBuildDir, helpBuildDir ] } - compileClasspath = files(sourceSets.main.java.outputDir) + compileClasspath = files(sourceSets.main.java.destinationDirectory) compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"]) runtimeClasspath = compileClasspath @@ -607,14 +608,14 @@ sourceSets { clover { java { srcDirs cloverInstrDir - outputDir = cloverClassesDir + destinationDirectory = cloverClassesDir } resources { srcDirs = sourceSets.main.resources.srcDirs } - compileClasspath = files( sourceSets.clover.java.outputDir ) + compileClasspath = files( sourceSets.clover.java.destinationDirectory ) //compileClasspath += files( testClassesDir ) compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"]) compileClasspath += fileTree(dir: "${jalviewDir}/${clover_lib_dir}", include: ["*.jar"]) @@ -626,14 +627,14 @@ sourceSets { test { java { srcDirs testSourceDir - outputDir = file(testClassesDir) + destinationDirectory = file(testClassesDir) } resources { srcDirs = useClover ? sourceSets.clover.resources.srcDirs : sourceSets.main.resources.srcDirs } - compileClasspath = files( sourceSets.test.java.outputDir ) + compileClasspath = files( sourceSets.test.java.destinationDirectory ) compileClasspath += useClover ? sourceSets.clover.compileClasspath : sourceSets.main.compileClasspath compileClasspath += fileTree(dir: "${jalviewDir}/${utils_dir}/testnglibs", include: ["**/*.jar"]) @@ -658,7 +659,7 @@ eclipse { } classpath { - //defaultOutputDir = sourceSets.main.java.outputDir + //defaultOutputDir = sourceSets.main.java.destinationDirectory configurations.each{ c-> if (c.isCanBeResolved()) { minusConfigurations += [c] @@ -697,7 +698,7 @@ eclipse { HashMap alreadyAddedLibPath = new HashMap<>(); sourceSets.main.compileClasspath.findAll { it.name.endsWith(".jar") }.any { - //don't want to add outputDir as eclipse is using its own output dir in bin/main + //don't want to add destinationDirectory as eclipse is using its own output dir in bin/main if (it.isDirectory() || ! it.exists()) { // don't add dirs to classpath, especially if they don't exist return false // groovy "continue" in .any closure @@ -717,7 +718,7 @@ eclipse { } sourceSets.test.compileClasspath.findAll { it.name.endsWith(".jar") }.any { - //no longer want to add outputDir as eclipse is using its own output dir in bin/main + //no longer want to add destinationDirectory as eclipse is using its own output dir in bin/main if (it.isDirectory() || ! it.exists()) { // don't add dirs to classpath return false // groovy "continue" in .any closure @@ -1094,7 +1095,7 @@ compileTestJava { clean { doFirst { - delete sourceSets.main.java.outputDir + delete sourceSets.main.java.destinationDirectory } } @@ -1102,7 +1103,7 @@ clean { cleanTest { dependsOn cleanClover doFirst { - delete sourceSets.test.java.outputDir + delete sourceSets.test.java.destinationDirectory } } @@ -1194,7 +1195,7 @@ def convertMdToHtml (FileTree mdFiles, File cssFile) { task copyDocs(type: Copy) { def inputDir = "${jalviewDir}/${doc_dir}" - def outputDir = "${docBuildDir}/${doc_dir}" + def destinationDirectory = "${docBuildDir}/${doc_dir}" from(inputDir) { include('**/*.txt') include('**/*.md') @@ -1215,10 +1216,10 @@ task copyDocs(type: Copy) { exclude('**/*.html') exclude('**/*.xml') } - into outputDir + into destinationDirectory inputs.dir(inputDir) - outputs.dir(outputDir) + outputs.dir(destinationDirectory) } @@ -1283,15 +1284,15 @@ def mdFileComponents(File mdFile, def dateOnly=false) { } if (inFrontMatter) { def m = null - if (m = line =~ /^date:\s*(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})/) { + if (m == line =~ /^date:\s*(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})/) { map["date"] = new Date().parse("yyyy-MM-dd HH:mm:ss", m[0][1]) - } else if (m = line =~ /^date:\s*(\d{4}-\d{2}-\d{2})/) { + } else if (m == line =~ /^date:\s*(\d{4}-\d{2}-\d{2})/) { map["date"] = new Date().parse("yyyy-MM-dd", m[0][1]) - } else if (m = line =~ /^channel:\s*(\S+)/) { + } else if (m == line =~ /^channel:\s*(\S+)/) { map["channel"] = m[0][1] - } else if (m = line =~ /^version:\s*(\S+)/) { + } else if (m == line =~ /^version:\s*(\S+)/) { map["version"] = m[0][1] - } else if (m = line =~ /^\s*([^:]+)\s*:\s*(\S.*)/) { + } else if (m == line =~ /^\s*([^:]+)\s*:\s*(\S.*)/) { map[ m[0][1] ] = m[0][2] } if (dateOnly && map["date"] != null) { @@ -1350,7 +1351,7 @@ task hugoTemplates { def inSection = false changes.eachLine { line -> def m = null - if (m = line =~ /^##([^#].*)$/) { + if (m == line =~ /^##([^#].*)$/) { if (inSection) { changesHugo += "
\n\n" } @@ -1360,7 +1361,7 @@ task hugoTemplates { section = section.replaceAll(/[^a-z0-9_\-]/, "") changesHugo += "
\n\n" inSection = true - } else if (m = line =~ /^(\s*-\s*)(.*?)()?\s*$/) { + } else if (m == line =~ /^(\s*-\s*)(.*?)()?\s*$/) { def comment = m[0][2].trim() if (comment != "") { comment = comment.replaceAll('"', """) @@ -1430,7 +1431,7 @@ def getMdSections(String content) { def sectionName = null content.eachLine { line -> def m = null - if (m = line =~ /^##([^#].*)$/) { + if (m == line =~ /^##([^#].*)$/) { if (sectionName != null) { sections[sectionName] = sectionContent sectionName = null @@ -1453,7 +1454,7 @@ def getMdSections(String content) { task copyHelp(type: Copy) { def inputDir = helpSourceDir - def outputDir = "${helpBuildDir}/${help_dir}" + def destinationDirectory = "${helpBuildDir}/${help_dir}" from(inputDir) { include('**/*.txt') include('**/*.md') @@ -1478,14 +1479,15 @@ task copyHelp(type: Copy) { exclude('**/*.xml') exclude('**/*.jhm') } - into outputDir + into destinationDirectory inputs.dir(inputDir) outputs.files(helpFile) - outputs.dir(outputDir) + outputs.dir(destinationDirectory) } +/* task releasesTemplates { group "help" description "Recreate whatsNew.html and releases.html from markdown files and templates in help" @@ -1562,9 +1564,9 @@ task releasesTemplates { def lm = null def rContentProcessed = "" rContent.eachLine { line -> - if (lm = line =~ /^(\s*-)(\s*)(.*)$/) { + if (lm == line =~ /^(\s*-)(\s*)(.*)$/) { line = "${lm[0][1]}${lm[0][3]}${lm[0][2]}" - } else if (lm = line =~ /^###([^#]+.*)$/) { + } else if (lm == line =~ /^###([^#]+.*)$/) { line = "_${lm[0][1].trim()}_" } rContentProcessed += line + "\n" @@ -1622,13 +1624,14 @@ task releasesTemplates { outputs.file(whatsnewHtmlFile) } +*/ task copyResources(type: Copy) { group = "build" description = "Copy (and make text substitutions in) the resources dir to the build area" def inputDir = resourceDir - def outputDir = resourcesBuildDir + def destinationDirectory = resourcesBuildDir from(inputDir) { include('**/*.txt') include('**/*.md') @@ -1649,10 +1652,10 @@ task copyResources(type: Copy) { exclude('**/*.html') exclude('**/*.xml') } - into outputDir + into destinationDirectory inputs.dir(inputDir) - outputs.dir(outputDir) + outputs.dir(destinationDirectory) } task copyChannelResources(type: Copy) { @@ -1683,6 +1686,7 @@ task copyChannelResources(type: Copy) { task createBuildProperties(type: WriteProperties) { dependsOn copyResources + dependsOn copyChannelResources group = "build" description = "Create the ${buildProperties} file" @@ -1706,6 +1710,7 @@ task createBuildProperties(type: WriteProperties) { task buildIndices(type: JavaExec) { dependsOn copyHelp + //dependsOn releasesTemplates classpath = sourceSets.main.compileClasspath main = "com.sun.java.help.search.Indexer" workingDir = "${helpBuildDir}/${help_dir}" @@ -1733,7 +1738,7 @@ task prepare { dependsOn buildResources dependsOn copyDocs dependsOn copyHelp - dependsOn releasesTemplates + //dependsOn releasesTemplates dependsOn convertMdFiles dependsOn buildIndices } @@ -1742,6 +1747,14 @@ task prepare { compileJava.dependsOn prepare run.dependsOn compileJava compileTestJava.dependsOn compileJava +compileTestJava.dependsOn buildIndices +processResources.dependsOn copyChannelResources +processResources.dependsOn copyResources +processResources.dependsOn createBuildProperties +processResources.dependsOn copyDocs +processResources.dependsOn convertMdFiles +processResources.dependsOn copyHelp +processResources.dependsOn buildIndices @@ -2037,6 +2050,7 @@ private static void printResults(allResults) { /* END of test tasks results summary */ +/* task compileLinkCheck(type: JavaCompile) { options.fork = true classpath = files("${jalviewDir}/${utils_dir}") @@ -2071,6 +2085,7 @@ task linkCheck(type: JavaExec) { inputs.dir(helpBuildDir) outputs.file(helpLinksCheckerOutFile) } +*/ // import the pubhtmlhelp target @@ -2085,10 +2100,14 @@ task cleanPackageDir(type: Delete) { } } +// block of dependencies +//compileTestJava.dependsOn compileLinkCheck // +//copyChannelResources.dependsOn compileLinkCheck // +//convertMdFiles.dependsOn compileLinkCheck // jar { dependsOn prepare - dependsOn linkCheck + dependsOn //linkCheck manifest { attributes "Main-Class": main_class, @@ -2098,8 +2117,8 @@ jar { "Implementation-Version": JALVIEW_VERSION } - def outputDir = "${jalviewDir}/${package_dir}" - destinationDirectory = file(outputDir) + def destinationDirectory = "${jalviewDir}/${package_dir}" + destinationDirectory = file(destinationDirectory) archiveFileName = rootProject.name+".jar" duplicatesStrategy "EXCLUDE" @@ -2110,11 +2129,11 @@ jar { exclude "**/*.jar" exclude "**/*.jar.*" - inputs.dir(sourceSets.main.java.outputDir) + inputs.dir(sourceSets.main.java.destinationDirectory) sourceSets.main.resources.srcDirs.each{ dir -> inputs.dir(dir) } - outputs.file("${outputDir}/${archiveFileName}") + outputs.file("${destinationDirectory}/${archiveFileName}") } @@ -2207,7 +2226,7 @@ shadowJar { // this mainClassName is mandatory but gets ignored due to manifest created in doFirst{}. Set the Main-Class as an attribute in launcherJar instead mainClassName = shadow_jar_main_class mergeServiceFiles() - classifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION + archiveClassifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION minimize() } @@ -3388,10 +3407,10 @@ task jalviewjsEclipseCopyDropins(type: Copy) { def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjs_eclipse_dropins_dir}", include: "*.jar") inputFiles += file("${jalviewDir}/${jalviewjsJ2sPlugin}") - def outputDir = "${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_eclipse_tmp_dropins_dir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_eclipse_tmp_dropins_dir}" from inputFiles - into outputDir + into destinationDirectory } @@ -3499,13 +3518,13 @@ task jalviewjsSyncAllLibs (type: Sync) { dependsOn jalviewjsTransferUnzipAllLibs def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteLibDir}") inputFiles += fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}") - def outputDir = "${jalviewDir}/${jalviewjsSiteDir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsSiteDir}" from inputFiles - into outputDir + into destinationDirectory def outputFiles = [] rename { filename -> - outputFiles += "${outputDir}/${filename}" + outputFiles += "${destinationDirectory}/${filename}" null } preserve { @@ -3524,13 +3543,13 @@ task jalviewjsSyncResources (type: Sync) { dependsOn buildResources def inputFiles = fileTree(dir: resourcesBuildDir) - def outputDir = "${jalviewDir}/${jalviewjsSiteDir}/${jalviewjs_j2s_subdir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsSiteDir}/${jalviewjs_j2s_subdir}" from inputFiles - into outputDir + into destinationDirectory def outputFiles = [] rename { filename -> - outputFiles += "${outputDir}/${filename}" + outputFiles += "${destinationDirectory}/${filename}" null } preserve { @@ -3543,13 +3562,13 @@ task jalviewjsSyncResources (type: Sync) { task jalviewjsSyncSiteResources (type: Sync) { def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjs_site_resource_dir}") - def outputDir = "${jalviewDir}/${jalviewjsSiteDir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsSiteDir}" from inputFiles - into outputDir + into destinationDirectory def outputFiles = [] rename { filename -> - outputFiles += "${outputDir}/${filename}" + outputFiles += "${destinationDirectory}/${filename}" null } preserve { @@ -3563,13 +3582,13 @@ task jalviewjsSyncSiteResources (type: Sync) { task jalviewjsSyncBuildProperties (type: Sync) { dependsOn createBuildProperties def inputFiles = [file(buildProperties)] - def outputDir = "${jalviewDir}/${jalviewjsSiteDir}/${jalviewjs_j2s_subdir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsSiteDir}/${jalviewjs_j2s_subdir}" from inputFiles - into outputDir + into destinationDirectory def outputFiles = [] rename { filename -> - outputFiles += "${outputDir}/${filename}" + outputFiles += "${destinationDirectory}/${filename}" null } preserve { @@ -3788,7 +3807,7 @@ task jalviewjsBuildAllCores { def swingJ2sDir = "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}/${jalviewjs_j2s_subdir}" def libJ2sDir = "${jalviewDir}/${jalviewjsTransferSiteLibDir}/${jalviewjs_j2s_subdir}" def jsDir = "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}/${jalviewjs_js_subdir}" - def outputDir = "${jalviewDir}/${jalviewjsTransferSiteCoreDir}/${jalviewjs_j2s_subdir}/core" + def destinationDirectory = "${jalviewDir}/${jalviewjsTransferSiteCoreDir}/${jalviewjs_j2s_subdir}/core" def prefixFile = "${jsDir}/core/coretop2.js" def suffixFile = "${jsDir}/core/corebottom2.js" @@ -3832,8 +3851,8 @@ task jalviewjsBuildAllCores { } def list = fileTree(dir: j2sDir, includes: filelist) - def jsfile = "${outputDir}/core${name}.js" - def zjsfile = "${outputDir}/core${name}.z.js" + def jsfile = "${destinationDirectory}/core${name}.js" + def zjsfile = "${destinationDirectory}/core${name}.z.js" jalviewjsCoreClasslists += [ 'jsfile': jsfile, @@ -3851,8 +3870,8 @@ task jalviewjsBuildAllCores { // _stevesoft core. add any cores without a classlist here (and the inputs and outputs) def stevesoftClasslistName = "_stevesoft" def stevesoftClasslist = [ - 'jsfile': "${outputDir}/core${stevesoftClasslistName}.js", - 'zjsfile': "${outputDir}/core${stevesoftClasslistName}.z.js", + 'jsfile': "${destinationDirectory}/core${stevesoftClasslistName}.js", + 'zjsfile': "${destinationDirectory}/core${stevesoftClasslistName}.z.js", 'list': fileTree(dir: j2sDir, include: "com/stevesoft/pat/**/*.js"), 'name': stevesoftClasslistName ] @@ -3885,8 +3904,8 @@ task jalviewjsBuildAllCores { ] ) def allClasslist = [ - 'jsfile': "${outputDir}/core${allClasslistName}.js", - 'zjsfile': "${outputDir}/core${allClasslistName}.z.js", + 'jsfile': "${destinationDirectory}/core${allClasslistName}.js", + 'zjsfile': "${destinationDirectory}/core${allClasslistName}.z.js", 'list': allJsFiles, 'name': allClasslistName ] @@ -3939,11 +3958,11 @@ task jalviewjsPublishCoreTemplates { dependsOn jalviewjsBuildAllCores def inputFileName = "${jalviewDir}/${j2s_coretemplate_html}" def inputFile = file(inputFileName) - def outputDir = "${jalviewDir}/${jalviewjsTransferSiteCoreDir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsTransferSiteCoreDir}" def outputFiles = [] jalviewjsCoreClasslists.each { cl -> - def outputFile = "${outputDir}/${jalviewjsJalviewTemplateName}_${cl.name}.html" + def outputFile = "${destinationDirectory}/${jalviewjsJalviewTemplateName}_${cl.name}.html" cl['outputfile'] = outputFile outputFiles += outputFile } @@ -3962,13 +3981,13 @@ task jalviewjsSyncCore (type: Sync) { dependsOn jalviewjsBuildAllCores dependsOn jalviewjsPublishCoreTemplates def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteCoreDir}") - def outputDir = "${jalviewDir}/${jalviewjsSiteDir}" + def destinationDirectory = "${jalviewDir}/${jalviewjsSiteDir}" from inputFiles - into outputDir + into destinationDirectory def outputFiles = [] rename { filename -> - outputFiles += "${outputDir}/${filename}" + outputFiles += "${destinationDirectory}/${filename}" null } preserve { diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index 346e3fa..ee08d60 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -601,7 +601,7 @@ public class CalculationChooser extends JPanel ScoreModels scoreModels = ScoreModels.getInstance(); for (ScoreModelI sm : scoreModels.getModels()) { - if (!forPasimap && (!nucleotide && sm.isProtein() || nucleotide && sm.isDNA() + if ((!nucleotide && sm.isProtein() || nucleotide && sm.isDNA() || sm.isSecondaryStructure() && ssPresent)) { diff --git a/src/jalview/gui/RotatableCanvas.java b/src/jalview/gui/RotatableCanvas.java index 042f178..3a2089b 100755 --- a/src/jalview/gui/RotatableCanvas.java +++ b/src/jalview/gui/RotatableCanvas.java @@ -506,6 +506,7 @@ public class RotatableCanvas extends JPanel { rotate(-1f, 0f); } + /* else if (evt.getKeyChar() == 's') { // Cache.warn("DEBUG: Rectangle selection"); @@ -515,6 +516,7 @@ public class RotatableCanvas extends JPanel { rectSelect(rectx1, recty1, rectx2, recty2); } + */ } repaint(); @@ -630,10 +632,14 @@ public class RotatableCanvas extends JPanel int yDelta = yPos - mouseY; // Check if this is a rectangle drawing drag - if ((evt.getModifiersEx() & InputEvent.BUTTON2_DOWN_MASK) != 0) + if ((evt.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0) { rectx2 = evt.getX(); recty2 = evt.getY(); + if ((rectx2 != -1) && (recty2 != -1)) + { + rectSelect(rectx1, recty1, rectx2, recty2); + } } else { @@ -641,11 +647,9 @@ public class RotatableCanvas extends JPanel mouseX = xPos; mouseY = yPos; - // findWidths(); - - repaint(); } + repaint(); } @Override -- 1.7.10.2