Skip to content

Commit

Permalink
Merge pull request #484 from TiVo/v16_BuildSupport
Browse files Browse the repository at this point in the history
V16 build support (Includes PR #481)
  • Loading branch information
EBatTiVo authored Sep 28, 2016
2 parents 6c53d51 + 4e83cb0 commit 55ea89e
Show file tree
Hide file tree
Showing 40 changed files with 2,465 additions and 57 deletions.
5 changes: 2 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
jdk:
- oraclejdk7
- oraclejdk8
before_script:
- sudo add-apt-repository ppa:eyecreate/haxe -y
- sudo apt-get update
Expand All @@ -13,8 +13,10 @@ before_script:
- mkdir report
script: make ANT_TARGET=$ANT_TARGET test
env:
- IDEA_VERSION=14.0.4 ANT_TARGET=test
- IDEA_VERSION=14.1.6 ANT_TARGET=test
- IDEA_VERSION=15.0.4 ANT_TARGET=compile_test
- IDEA_VERSION=14.0.5 ANT_TARGET=test
- IDEA_VERSION=14.1.7 ANT_TARGET=test
- IDEA_VERSION=15.0.6 ANT_TARGET=compile_test
- IDEA_VERSION=2016.1.4 ANT_TARGET=compile_test
- IDEA_VERSION=2016.2.4 ANT_TARGET=test
notifications:
email: false
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<li>Navigate to symbols (issue #340)</li>
<li>Fix incorrect error annotation in extended class for static fields and methods with same names like in base class. (issue #449)</li>
<li>Fix method local variables and arguments completion. (issue #455)</li>
<li>Fix
</ul>
<p>0.9.9: (community release)</p>
<ul>
Expand Down
39 changes: 32 additions & 7 deletions build-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@
verbose="false"
debug="true"
debuglevel="lines,vars,source"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
includeantruntime="false" >

<!-- <compilerarg value="-Xlint:deprecation" /> -->
<!-- <compilerarg value="-Xlint:unchecked" /> -->

<src path="${version.specific.code.location}" />
<src path="src/common" />
<src path="src/icons" />
Expand Down Expand Up @@ -105,28 +108,50 @@

<property name="suspend" value="n"/>

<!-- On a mac, the proper JRE is included as part of the IDEA distribution. -->
<condition property="idea.test.jvm" value="${idea.ultimate.build}/jre/jre/bin/java">
<os family="mac"/>
</condition>
<property name="idea.test.jvm" value="java"/>

<condition property="is.java8plus" value="true">
<or>
<equals arg1="${ant.java.version}" arg2="1.8"/>
<equals arg1="${ant.java.version}" arg2="1.9"/>
</or>
</condition>
<property name="is.java8plus" value="false"/>
<echo level="verbose">Java version of ${ant.java.version} is Java8 or greater? ${is.java8plus}</echo>

<!-- Tests fail with a default MaxPermSize. They use up all of the PermGen memory. -->
<condition property="test.extraargs" value="-XX:MaxMetaspaceSize=256M">
<istrue value="${is.java8plus}"/>
</condition>
<property name="test.extraargs" value="-XX:MaxPermSize=256M"/>
<echo level="verbose">Extra args being used on tests: ${test.extraargs}</echo>

<junit
haltonfailure="false"
haltonfailure="true"
showoutput="no"
failureProperty="failure_found"
fork="yes"
forkmode="once"
reloading="no"
enabletestlistenerevents="true">
enabletestlistenerevents="true"
jvm="${idea.test.jvm}">

<jvmarg value="-Didea.home.path=${idea.ultimate.build}"/>
<jvmarg value="-Xbootclasspath/a:${idea.ultimate.build}/lib/boot.jar"/>
<jvmarg value="-Dfile.encoding=UTF-8"/>
<jvmarg value="-ea"/>
<jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=43251"/>
<jvmarg value="-Didea.launcher.bin.path=${idea.ultimate.build}/bin"/>
<!-- Tests fail with a default MaxPermSize. They use up all of the PermGen memory. -->
<jvmarg value="-XX:MaxPermSize=256m"/>
<jvmarg line="${test.extraargs}"/>
<classpath refid="classpath.test"/>

<formatter type="brief" usefile="false"/>

<batchtest>
<batchtest fork="yes">
<fileset dir="testSrc">
<include name="**/*Test.java"/>
<exclude name="**/*TestCase.java"/>
Expand Down
12 changes: 6 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
destdir="${jps.build.output.directory}"
verbose="false"
debug="false"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
fork="true"
includeantruntime="true" >

Expand All @@ -69,8 +69,8 @@
destdir="${common.build.output.directory}"
verbose="false"
debug="true"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
includeantruntime="true" >

<src path="common/src" />
Expand All @@ -88,8 +88,8 @@
destdir="${plugin.build.output.directory}"
verbose="false"
debug="true"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
includedestclasses="false"
createmissingpackageinfoclass="false"
includeantruntime="false" >
Expand Down
3 changes: 3 additions & 0 deletions common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
// Lookup table for properties files. Add new versions here.
var propertiesFile = "";
switch(parseInt(codeLine, 10)) {
case 163: propertiesFile = "idea_v16.properties"; break; // EAP
case 162: propertiesFile = "idea_v16.properties"; break;
case 145: propertiesFile = "idea_v16.properties"; break;
case 143: propertiesFile = "idea_v15.properties"; break;
case 141:
if (parseInt(buildNumber, 10) <= 2734) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ haxe.target.php=PHP
haxe.target.java=Java
haxe.target.csharp=C#
haxe.target.python=Python
haxe.target.lua=Lua
haxe.run.module=&Module\:
no.sdk.for.module=No SDK for module\: {0}
no.main.class.for.module=No main class for module\: {0}
Expand Down
7 changes: 6 additions & 1 deletion common/src/com/intellij/plugins/haxe/config/HaxeTarget.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public String getTargetFileNameWithExtension(String fileName) {
@NotNull
@Override
public String getTargetFileNameWithExtension(String fileName) {
String name = SystemProperties.getOsName();
return fileName + ".exe";
}
}, PYTHON("python", HaxeCommonBundle.message("haxe.target.python")) {
Expand All @@ -77,6 +76,12 @@ public String getTargetFileNameWithExtension(String fileName) {
public String getTargetFileNameWithExtension(String fileName) {
return fileName + ".py";
}
}, LUA("lua", HaxeCommonBundle.message("haxe.target.lua")) {
@NotNull
@Override
public String getTargetFileNameWithExtension(String fileName) {
return fileName + ".lua";
}
};

private final String flag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public interface HaxeTokenTypes {
IElementType LOGIC_OR_EXPRESSION = new HaxeElementType("LOGIC_OR_EXPRESSION");
IElementType LONG_TEMPLATE_ENTRY = new HaxeElementType("LONG_TEMPLATE_ENTRY");
IElementType MACRO_CLASS = new HaxeElementType("MACRO_CLASS");
IElementType MACRO_CLASS_LIST = new HaxeElementType("MACRO_CLASS_LIST");
IElementType MACRO_CLASS_LIST = new HaxeMacroClassListElementType();
IElementType META_KEY_VALUE = new HaxeElementType("META_KEY_VALUE");
IElementType META_META = new HaxeElementType("META_META");
IElementType MULTIPLICATIVE_EXPRESSION = new HaxeElementType("MULTIPLICATIVE_EXPRESSION");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
package com.intellij.plugins.haxe.lang.psi.impl;

import java.util.List;

import com.intellij.plugins.haxe.lang.lexer.HaxeTokenTypes;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static com.intellij.plugins.haxe.lang.lexer.HaxeTokenTypes.*;
import com.intellij.plugins.haxe.lang.psi.*;

public class HaxeMacroClassListImpl extends HaxeModifierListPsiMixinImpl implements HaxeMacroClassList {
Expand All @@ -45,4 +46,8 @@ public List<HaxeMacroClass> getMacroClassList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, HaxeMacroClass.class);
}

@Override
public IElementType getTokenType() {
return HaxeTokenTypes.MACRO_CLASS_LIST;
}
}
6 changes: 6 additions & 0 deletions idea_v14.1.5.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ plugin.installable.until=141.9999
# Where to find Idea14-specific code.
# ###################################################
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
6 changes: 6 additions & 0 deletions idea_v14.1.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ plugin.installable.until=141.2734
# Where to find Idea14-specific code.
# ###################################################
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
6 changes: 6 additions & 0 deletions idea_v14.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ plugin.installable.until=139.9999
# Where to find Idea14-specific code.
# ###################################################
version.specific.code.location=src/14

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
6 changes: 6 additions & 0 deletions idea_v15.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ plugin.installable.until=143.9999
# ###################################################
# Use the 14.1 source tree, for the moment.
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
34 changes: 34 additions & 0 deletions idea_v16.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Properties for building against IDEA version 16.
#

# Target version of IDEA that we typically build for.
# This is appended to the name of the intellij-haxe-XXX jar file.
idea.version=16

# Human-readable versions of IDEA that this build is compatible with.
plugin.compatibility.description=IDEA 2016.1 through 2016.3(EAP)

# ###################################################
# IDEA build IDs that are compatible with this plugin.
# ###################################################
#
# IDEA builds prior to this one will not install this plugin.
#
plugin.installable.since=145.0
#
# IDEA builds after this one will not install this plugin.
#
plugin.installable.until=163.9999

# ###################################################
# Where to find Idea16-specific code.
# ###################################################
# Use the 14.1 source tree, for the moment.
version.specific.code.location=src/16.0

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.8
plugin.java.target.compatibility=1.8
2 changes: 2 additions & 0 deletions intellij-haxe.iml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
<sourceFolder url="file://$MODULE_DIR$/src/icons" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/META-INF" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/14.1" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/16.0" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/build_test" />
<excludeFolder url="file://$MODULE_DIR$/src/13.1" />
<excludeFolder url="file://$MODULE_DIR$/src/14" />
<excludeFolder url="file://$MODULE_DIR$/src/14.1" />
</content>
<orderEntry type="jdk" jdkName="IDEA Ultimate" jdkType="IDEA JDK" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
3 changes: 3 additions & 0 deletions src/16.0/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This directory is reserved for IDEA version 14.1 specific code. Every attempt
at keeping code in the src/common directory should be made before adding code
here.
Loading

0 comments on commit 55ea89e

Please sign in to comment.