Skip to content

Commit

Permalink
Merge pull request #126 from xored/feature/v1.1.6
Browse files Browse the repository at this point in the history
v1.1.6
  • Loading branch information
SlimerDude authored Jul 17, 2021
2 parents 7392f59 + 25de835 commit 541a3c6
Show file tree
Hide file tree
Showing 353 changed files with 4,246 additions and 2,910 deletions.
2 changes: 1 addition & 1 deletion com.xored.f4.astView/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: F4 AstView
Bundle-SymbolicName: com.xored.f4.astView;singleton:=true
Bundle-Version: 1.1.4.qualifier
Bundle-Version: 1.1.6.qualifier
Bundle-Vendor: Xored software, Inc.
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime,
Expand Down
2 changes: 1 addition & 1 deletion com.xored.f4.astView/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</parent>
<groupId>com.xored.f4</groupId>
<artifactId>com.xored.f4.astView</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.6-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
4 changes: 2 additions & 2 deletions com.xored.f4.builder.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: F4 Builder UI
Bundle-SymbolicName: com.xored.f4.builder.ui;singleton:=true
Bundle-Version: 1.1.4.qualifier
Bundle-Version: 1.1.6.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: Xored software, Inc.
Require-Bundle: org.fantom.sys,
org.fantom.concurrent,
com.xored.fanide.core;bundle-version="1.1.4",
com.xored.fanide.core;bundle-version="1.1.6",
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui,
Expand Down
2 changes: 1 addition & 1 deletion com.xored.f4.builder.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</parent>
<groupId>com.xored.f4</groupId>
<artifactId>com.xored.f4.builder.ui</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.6-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
6 changes: 3 additions & 3 deletions com.xored.f4.builder/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: F4 Builder
Bundle-SymbolicName: com.xored.f4.builder;singleton:=true
Bundle-Version: 1.1.4.qualifier
Bundle-Version: 1.1.6.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.dltk.core,
org.eclipse.core.runtime,
Expand All @@ -17,8 +17,8 @@ Require-Bundle: org.eclipse.dltk.core,
org.fantom.compiler,
org.fantom.compilerJava,
com.xored.fantom.classfile;bundle-version="1.0.0",
com.xored.f4.core;bundle-version="1.1.4",
com.xored.f4.launching;bundle-version="1.1.4",
com.xored.f4.core;bundle-version="1.1.6",
com.xored.f4.launching;bundle-version="1.1.6",
org.fantom.concurrent,
org.eclipse.dltk.logconsole,
org.eclipse.core.externaltools;bundle-version="1.0.1"
Expand Down
Binary file modified com.xored.f4.builder/f4builder.pod
Binary file not shown.
4 changes: 0 additions & 4 deletions com.xored.f4.builder/fan/CompileFan.fan
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ class CompileFan : IScriptBuilder {
return Status(IStatus.OK, pluginId, "OK")
}

private FantomProject[] projectsFromElements(ISourceModule[] modules) {
modules.map { fantomProject(it.getScriptProject) }.unique
}

private Bool buildPod(FantomProject fp) {
building = true
clearMarkers(fp.project)
Expand Down
2 changes: 1 addition & 1 deletion com.xored.f4.builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</parent>
<groupId>com.xored.f4</groupId>
<artifactId>com.xored.f4.builder</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.6-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
6 changes: 3 additions & 3 deletions com.xored.f4.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: F4 Core
Bundle-SymbolicName: com.xored.f4.core;singleton:=true
Bundle-Version: 1.1.4.qualifier
Bundle-Version: 1.1.6.qualifier
Require-Bundle: org.fantom.sys,
org.fantom.concurrent,
org.eclipse.core.resources,
Expand All @@ -14,8 +14,8 @@ Require-Bundle: org.fantom.sys,
org.eclipse.dltk.launching,
org.eclipse.dltk.logconsole,
com.xored.fanide.core,
com.xored.f4.parser;bundle-version="1.1.4",
com.xored.f4.model;bundle-version="1.1.4",
com.xored.f4.parser;bundle-version="1.1.6",
com.xored.f4.model;bundle-version="1.1.6",
org.eclipse.text,
org.eclipse.pde.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Expand Down
Binary file modified com.xored.f4.core/f4core.pod
Binary file not shown.
1 change: 1 addition & 0 deletions com.xored.f4.core/fan/manifest/FantomProjectListener.fan
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ internal class DeltaVisitor2 {
IProject[] openedProjects := IProject[,]
IProject[] updatedProjects := IProject[,]

** Return 'true' to also visit children.
Bool visit(IResourceDelta? delta) {
resource := delta.getResource

Expand Down
38 changes: 27 additions & 11 deletions com.xored.f4.core/fan/manifest/FantomProjectManager.fan
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,34 @@ internal class FantomProjectManagerState {
// reset containers for all projects that depend on
// closed or opened projects and for all projects with updated content

projectsToUpdate := [Str:IProject][:] { it.ordered = true }
projectsToUpdate := [Str:IProject][:] { it.ordered = true }
projectsToRebuild := [Str:IProject][:] { it.ordered = true }

// add updated and opened Fantom projects
// update updated and opened Fantom projects
change.openedProjects.each {
// not sure why we need to check for Fantom projects?
if (isFantomProject(it)) projectsToUpdate[it.getName] = it
}
change.updatedProjects.each {
// not sure why we need to check for Fantom projects?
if (isFantomProject(it)) projectsToUpdate[it.getName] = it
}


// add parent projects
// update the dependencies of parent projects
change.openedProjects.each {
parentProjects(it).each { projectsToUpdate[it.getName] = it }
parentProjects(it).each { projectsToRebuild[it.getName] = it }
}
change.closedProjects.each {
parentProjects(it).each { projectsToUpdate[it.getName] = it }
parentProjects(it).each { projectsToRebuild[it.getName] = it }
}


// remove all closed projects
change.closedProjects.each {
projectsToUpdate.remove(it.getName)
projects .remove(it.getName)
projectsToUpdate .remove(it.getName)
projectsToRebuild.remove(it.getName)
projects .remove(it.getName)
}

// remove all updated projects to ensure they get re-created
Expand All @@ -86,7 +90,7 @@ internal class FantomProjectManagerState {

// do the update
projectsToUpdate.vals.each {
created := updateProject(it)
created := createProject(it)

if (created)
// resetting seems quite processor intensive, so only do it if we really need to
Expand All @@ -97,6 +101,18 @@ internal class FantomProjectManagerState {
projects[it.getName].reset
}

projectsToRebuild.vals.each {
fp := projects[it.getName]

// can't think why fp would be null but, you know, belts and braces when in the reactor!
if (fp != null) {
// reset and re-resolve to remove these annoying errors:
// - Project A is missing required script project: 'Project B'
fp.reset
fp.resolvedPods
}
}

return null
}

Expand All @@ -120,7 +136,7 @@ internal class FantomProjectManagerState {

FantomProject? getOrAdd(Unsafe projectRef) {
ip := (IProject) projectRef.val
updateProject(ip)
createProject(ip)
return projects[ip.getName]
}

Expand Down Expand Up @@ -154,7 +170,7 @@ internal class FantomProjectManagerState {
}

** Returns 'true' if the project was updated
private Bool updateProject(IProject ip) {
private Bool createProject(IProject ip) {
// if the existing project looks okay, let's keep it!
fp := projects[ip.getName]
if (fp != null)
Expand Down
23 changes: 21 additions & 2 deletions com.xored.f4.core/fan/manifest/Manifest.fan
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Manifest {
public static const Str filename := "build.fan"

** Lines of field initializers
Str:Int lines { private set }
Str:Int lines { private set }
Str:Obj? vals { private set }
Str? podName() { vals["podName"] }
Version version() { vals["version"] ?: Version("1.0") }
Expand Down Expand Up @@ -81,6 +81,7 @@ class Manifest {
if (expr is CallExpr) {
call := expr as CallExpr
callee := call.callee

if (isVersionConstructor(callee)) {
// first look for a Str ctor
versionStr := (call.args.first as Literal)?.val as Str
Expand All @@ -95,11 +96,29 @@ class Manifest {
}
}
}

return null
}

private static Bool isVersionConstructor(Expr callee) {
(callee as UnresolvedRef)?.text == "Version" || (callee as StaticTargetExpr)?.ctype?.resolvedType?.qname == "sys::Version"

// these are for standard syntax: Version("1.2")
if ((callee as UnresolvedRef)?.text == "Version")
return true
if ((callee as StaticTargetExpr)?.ctype?.resolvedType?.qname == "sys::Version")
return true

// this is for explicit make syntax: Version.make("1.2")
if (callee is InvokeExpr) {
icallee := ((InvokeExpr) callee).callee

if ((icallee as UnresolvedRef)?.text == "Version")
return true
if ((icallee as StaticTargetExpr)?.ctype?.resolvedType?.qname == "sys::Version")
return true
}

return false
}

private static Range:Int buildOffsets(Str file) {
Expand Down
4 changes: 2 additions & 2 deletions com.xored.f4.core/fan/util/ParseUtil.fan
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ParseUtil : TypeUtil
{
t != null && t.inheritance.any |Str baseName -> Bool|
{
baseType := ns.findType(baseName)
return baseType.qname == qNameBase || inherits(baseType, qNameBase, ns)
baseType := ns.findType(baseName)
return baseType?.qname == qNameBase || inherits(baseType, qNameBase, ns)
}
}

Expand Down
2 changes: 1 addition & 1 deletion com.xored.f4.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</parent>
<groupId>com.xored.f4</groupId>
<artifactId>com.xored.f4.core</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.6-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
14 changes: 7 additions & 7 deletions com.xored.f4.debug.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: F4 Debug UI
Bundle-SymbolicName: com.xored.f4.debug.ui;singleton:=true
Bundle-Version: 1.1.4.qualifier
Bundle-Version: 1.1.6.qualifier
Bundle-Vendor: Xored software, Inc.
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Expand All @@ -24,16 +24,16 @@ Require-Bundle: org.eclipse.debug.core,
org.eclipse.jdt.debug,
com.ibm.icu,
org.eclipse.ui.ide,
com.xored.f4.core;bundle-version="1.1.4",
com.xored.f4.debug;bundle-version="1.1.4",
com.xored.f4.launching;bundle-version="1.1.4",
com.xored.f4.parser;bundle-version="1.1.4",
com.xored.f4.core;bundle-version="1.1.6",
com.xored.f4.debug;bundle-version="1.1.6",
com.xored.f4.launching;bundle-version="1.1.6",
com.xored.f4.parser;bundle-version="1.1.6",
org.eclipse.dltk.debug,
org.eclipse.jdt.debug.ui,
org.eclipse.core.filesystem,
org.eclipse.core.variables,
com.xored.fanide.core;bundle-version="1.1.4",
com.xored.f4.model;bundle-version="1.1.4",
com.xored.fanide.core;bundle-version="1.1.6",
com.xored.f4.model;bundle-version="1.1.6",
org.eclipse.jdt.core,
org.eclipse.jdt.ui,
org.eclipse.core.filebuffers
Expand Down
Binary file modified com.xored.f4.debug.ui/f4debugUi.pod
Binary file not shown.
Loading

0 comments on commit 541a3c6

Please sign in to comment.