eclipse-plugin 0.0.2 → 0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWVhY2U4ZjdjNmE0OGUxMzg2Y2Q5NDIyYTQ4NTNlZmI5OGZkYTRjZg==
4
+ MzUzZGViZjE0MjlkNWExY2FmOThlMjQzMTg0NjhmMDc0ZWE3ZjJlMw==
5
5
  data.tar.gz: !binary |-
6
- NmU4YjQ4Mjc5OGYzYmI1ZjEyOTZiNzZjNTg4MTJlNTFiYWIwMDhkOA==
6
+ NDJlNDVmYWIwOGU1OWNjZjAyMGIyNTE3YjkyZjE0OTQ4NzgwZDYwOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmZkZDk1ZjBjNzlkOTJmZDYwYTZlMTc0Y2M2Y2EwZTcxNGI2MTkwNmExZGU2
10
- OTljOTIyOWU3ZDM0MTNhODI1OGJhZmZhZjdjYjkzYWM0ZmQ0ZmZmYzdiMWFj
11
- ZGNkYmZlMDhlYzIyZDIwYWY0NDMyZmUxOWQ5MjM4MWNhN2UxYjI=
9
+ YTBhNWNjZWJmMWNhNmMzYTZkMDgyNjI4MjU3YjMxNDFlMThjYzcyYzBkNTBh
10
+ NjViMzBlMDc1ZTNjNmRlN2VhYTAyMzVhNzk3ZjFkMmY5OTJjM2YyZGZkYzM2
11
+ ZjA3NDhkNWE2MjVhZDdjOWZjMWQ4OGNlNTM5MTkwYzk5ZGYwZTM=
12
12
  data.tar.gz: !binary |-
13
- ZDA1NGUzMWVmYWZmZmIwMDExYTg2MWUzNmFkYTk4MmNlYTk0M2QxYjc1YTQ2
14
- YmU2Nzc1OTcwNzgyNjhmNDEyMGMwZGQ4YzdjZGZhMDk1OWYzNjUwYTQ4Mzc3
15
- NzU3NzViNWZlMjM0MGJlN2YyYzE5NjUzZmQxZDlmZjUxYzlhMmM=
13
+ MGRlODc3N2RjN2NjMjIxNjFjYTcxZmZjODJjM2Q1Zjc2OTA4YTljYTAzMWY3
14
+ ZmI3MmE0MjJiMjFiZjVhMzUyNjY0Zjg5YzhjY2Q1YmRkZWU0OGUxMWNlMzcx
15
+ OTkwNzlhMGI4M2M5MWI4ZTIwZjRkODIzMGQ1NGJkYTA4MWEzNjE=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eclipse-plugin (0.0.2)
4
+ eclipse-plugin (0.1)
5
5
  rubyzip (< 1.0.0)
6
6
 
7
7
  GEM
@@ -1,60 +1,68 @@
1
1
  require "eclipse/plugin/version"
2
+ require "eclipse/helpers"
3
+ require "eclipse/workspace"
2
4
 
3
5
  require 'zip/zip'
4
6
  require "rexml/document"
5
7
  include REXML # so that we don't have to prefix everything with REXML::...
6
8
 
7
9
  module Eclipse
8
- class Workspace
9
- attr_reader :workspace_dir, :views, :view_categories, :preferencePages, :perspectives, :preferencePage_categories
10
- def initialize(workspace_dir)
11
- @workspace_dir = workspace_dir
12
- @views = Hash.new
13
- @view_categories = Hash.new
14
- @preferencePages = Hash.new
15
- @perspectives = Hash.new
16
- @preferencePage_categories = Hash.new
17
- end
18
-
19
- def parsePluginDir(plugins_dir = File.join(@workspace_dir, "plugins"))
20
- Dir.glob("#{plugins_dir}/*.jar").each{ |jarname| add_info(Plugin::Info.new(jarname)) }
21
- show if $VERBOSE
22
- end
23
-
24
- def parse_sub_dirs
25
- Dir.glob("#{@workspace_dir}/*").each{
26
- |item|
27
- next unless File.directory?(item)
28
- add_info(Plugin::Info.new(item))
29
- }
30
- show if $VERBOSE
31
- end
32
- def show
33
- puts "Workspace #{@workspace_dir} with #{@views.size}/#{@view_categories.size} views #{@preferencePages.size}/#{@preferencePage_categories.size} preferencePages #{@perspectives.size} perspectives"
34
- end
35
- private
36
- def add_info(info)
37
- info.views.each{ |k, v| @views[k] = v }
38
- info.view_categories.each{ |k, v| @view_categories[k] = v }
39
- info.perspectives.each{ |k, v| @perspectives[k] = v }
40
- info.preferencePages.each{ |k, v| @preferencePages[k] = v }
41
- info.preferencePage_categories.each{ |k, v| @preferencePage_categories[k] = v }
42
- end
43
- end
44
-
45
10
  module Plugin
46
11
  class Info
47
12
  attr_reader :iso, :views, :view_categories, :preferencePages, :perspectives, :workspace, :preferencePage_categories
13
+ attr_reader :symbolicName, :feature, :jar_or_src
48
14
  # Some helper classes for the extension points we are interested in
49
15
  UI_PreferencePage = Struct.new('UI_PreferencePage', :id, :category, :translation)
50
16
  UI_View = Struct.new('UI_View', :id, :category, :translation)
51
17
  UI_Perspective = Struct.new('UI_Perspective', :id, :category, :translation)
52
- Category = Struct.new('Category', :id, :name, :translation)
18
+ Feature = Struct.new('Feature', :id, :label, :version, :provider, :description, :license, :copyright)
19
+ Category = Struct.new('Category', :id, :name, :translation)
20
+
21
+ # method parse copied from buildr.apache.org/lib/buildr/java/packaging.rb
22
+ # Avoids pulling in buildr with a lot of dependencies
23
+ # :call-seq:
24
+ # parse(str) => manifest
25
+ #
26
+ # Parse a string in MANIFEST.MF format and return a new Manifest.
27
+ LINE_SEPARATOR = /\r\n|\n|\r[^\n]/ #:nodoc:
28
+ SECTION_SEPARATOR = /(#{LINE_SEPARATOR}){2}/ #:nodoc:
29
+ def parse(str)
30
+ sections = str.split(SECTION_SEPARATOR).reject { |s| s.strip.empty? }
31
+ sections = sections.map { |section|
32
+ lines = section.split(LINE_SEPARATOR).inject([]) { |merged, line|
33
+ if line[/^ /] == ' '
34
+ merged.last << line[1..-1]
35
+ else
36
+ merged << line
37
+ end
38
+ merged
39
+ }
40
+ lines.map { |line| line.scan(/(.*?):\s*(.*)/).first }.
41
+ inject({}) { |map, (key, value)| map.merge(key=>value) }
42
+ }
43
+ sections
44
+ end
53
45
 
46
+ def getFeatureInfo(content)
47
+ doc = Document.new(content)
48
+ doc.root.elements
49
+ @feature = Feature.new(doc.root.attributes['id'],
50
+ doc.root.attributes['label'],
51
+ doc.root.attributes['version'],
52
+ doc.root.attributes['provider'],
53
+ doc.root.elements['description'].text,
54
+ doc.root.elements['license'].text.gsub(/\n\s*/, ''),
55
+ doc.root.elements['copyright'].text.gsub(/\n\s*/, '')
56
+ )
57
+ # could enumerate a lot of plugins and which other features are included
58
+ # doc.root.elements['plugin'].attributes['id']
59
+ end
60
+
54
61
  def initialize(jar_or_src, iso='de')
55
62
  @workspace = File.dirname(jar_or_src).sub(/\/plugins$/, '')
56
63
  @iso = iso
57
64
  @jar_or_src = jar_or_src
65
+ @feature = nil
58
66
  @views = Hash.new
59
67
  @view_categories = Hash.new
60
68
  @preferencePages = Hash.new
@@ -64,11 +72,24 @@ module Eclipse
64
72
  if File.directory?(jar_or_src)
65
73
  @jarfile = nil
66
74
  readPluginXML(jar_or_src)
75
+ mfName = File.join(jar_or_src, 'META-INF', 'MANIFEST.MF')
76
+ featureName = File.join(jar_or_src, 'feature.xml')
77
+ if File.exists?(featureName)
78
+ getFeatureInfo(File.read(featureName))
79
+ elsif File.exists?(mfName)
80
+ getSymbolicNameFrom(File.read(mfName))
81
+ end
67
82
  else
68
- # @jarname = jar_or_src
69
83
  @jarfile = Zip::ZipFile.open(jar_or_src)
70
84
  readPluginXML(File.basename(jar_or_src))
85
+ if @jarfile.find_entry('feature.xml')
86
+ getFeatureInfo(@jarfile.read('feature.xml'))
87
+ elsif @jarfile.find_entry('META-INF/MANIFEST.MF')
88
+ getSymbolicNameFrom(@jarfile.read('META-INF/MANIFEST.MF'))
89
+ end
71
90
  end
91
+ # @nonfree = /medelexis/i.match(File.dirname(File.dirname(plugin)))
92
+
72
93
  if false
73
94
  # rescue => e # HACK: we need this to handle org.apache.commons.lang under Windows-7
74
95
  puts "Skipped plugin #{File.expand_path(jar_or_src)}"
@@ -153,7 +174,8 @@ module Eclipse
153
174
  if @jarfile
154
175
  content = @jarfile.read(properties) if @jarfile.find_entry(properties)
155
176
  else
156
- properties = File.new(File.join(@jar_or_src, "plugin.properties")).read
177
+ name = File.join(@jar_or_src, "plugin.properties")
178
+ properties = File.new(name).read if File.exists?(name)
157
179
  end
158
180
  return look_for unless content
159
181
  line_nr = 0
@@ -170,12 +192,21 @@ module Eclipse
170
192
  return look_for # default
171
193
  end
172
194
 
195
+ def getSymbolicNameFrom(content)
196
+ if content
197
+ mf = parse(content)
198
+ @symbolicName = mf[0]['Bundle-SymbolicName'].split(';')[0]
199
+ end
200
+ end
201
+
173
202
  def readPluginXML(plugin)
174
203
  if @jarfile
175
204
  return unless @jarfile.find_entry('plugin.xml')
176
205
  doc = Document.new @jarfile.read('plugin.xml')
177
206
  else
178
- doc = Document.new File.new(File.join(plugin, 'plugin.xml')).read
207
+ plugin_xml = File.join(plugin, 'plugin.xml')
208
+ return unless File.exists?(plugin_xml)
209
+ doc = Document.new File.new(plugin_xml).read
179
210
  end
180
211
  # Get all perspectives
181
212
  root = doc.root
@@ -1,5 +1,5 @@
1
1
  module Eclipse
2
2
  module Plugin
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1"
4
4
  end
5
5
  end
@@ -0,0 +1,61 @@
1
+ require "eclipse/plugin"
2
+
3
+ module Eclipse
4
+ class Workspace
5
+ attr_reader :workspace_dir, :views, :view_categories, :preferencePages, :perspectives, :preferencePage_categories, :plugins
6
+ def initialize(workspace_dir)
7
+ @workspace_dir = workspace_dir
8
+ @views = Hash.new
9
+ @view_categories = Hash.new
10
+ @preferencePages = Hash.new
11
+ @perspectives = Hash.new
12
+ @preferencePage_categories = Hash.new
13
+ @plugins = Hash.new
14
+ @features = Hash.new
15
+ end
16
+
17
+ def parsePluginDir(plugins_dir = File.join(@workspace_dir, "plugins"))
18
+ Dir.glob("#{plugins_dir}/*.jar").each{
19
+ |jarname|
20
+ info = Plugin::Info.new(jarname)
21
+ next unless info
22
+ add_info(info)
23
+ }
24
+ show if $VERBOSE
25
+ end
26
+
27
+ def parse_sub_dirs
28
+ Dir.glob("#{@workspace_dir}/*").each{
29
+ |item|
30
+ proj = File.join(item, '.project')
31
+ name = nil
32
+ name = Document.new(File.new(proj).read).root.elements['name'].text if File.exists?(proj)
33
+ next unless File.directory?(item)
34
+ info = Plugin::Info.new(item)
35
+ next unless info # ex. we read a feature
36
+ add_info(info)
37
+ if name and info.symbolicName and name != info.symbolicName
38
+ puts "Warning: in #{item} the symbolicName (#{info.symbolicName}) of the plugin differs from the project name #{name}"
39
+ end
40
+ }
41
+ show if $VERBOSE
42
+ end
43
+ def show
44
+ puts "Workspace #{@workspace_dir} with #{@plugins.size} plugins #{@views.size}/#{@view_categories.size} views #{@preferencePages.size}/#{@preferencePage_categories.size} preferencePages #{@perspectives.size} perspectives"
45
+ end
46
+ private
47
+ def add_info(info)
48
+ if info.feature
49
+ @features[info.feature.id] = info
50
+ return
51
+ end
52
+ return unless info.symbolicName
53
+ @plugins[info.symbolicName] = info
54
+ info.views.each{ |k, v| @views[k] = v }
55
+ info.view_categories.each{ |k, v| @view_categories[k] = v }
56
+ info.perspectives.each{ |k, v| @perspectives[k] = v }
57
+ info.preferencePages.each{ |k, v| @preferencePages[k] = v }
58
+ info.preferencePage_categories.each{ |k, v| @preferencePage_categories[k] = v }
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>ch.elexis.core.application</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.pde.ManifestBuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ <buildCommand>
19
+ <name>org.eclipse.pde.SchemaBuilder</name>
20
+ <arguments>
21
+ </arguments>
22
+ </buildCommand>
23
+ <buildCommand>
24
+ <name>org.zeroturnaround.eclipse.rebelXmlBuilder</name>
25
+ <arguments>
26
+ </arguments>
27
+ </buildCommand>
28
+ </buildSpec>
29
+ <natures>
30
+ <nature>org.eclipse.pde.PluginNature</nature>
31
+ <nature>org.eclipse.jdt.core.javanature</nature>
32
+ <nature>org.zeroturnaround.eclipse.jrebelNature</nature>
33
+ </natures>
34
+ </projectDescription>
@@ -0,0 +1,22 @@
1
+ Manifest-Version: 1.0
2
+ Bundle-ManifestVersion: 2
3
+ Bundle-Name: Elexis Open Source Application
4
+ Bundle-SymbolicName: ch.elexis.core.application;singleton:=true
5
+ Bundle-Version: 3.0.0.qualifier
6
+ Bundle-Vendor: elexis.info
7
+ Bundle-Localization: plugin
8
+ Require-Bundle: org.eclipse.core.runtime,
9
+ org.eclipse.ui;bundle-version="3.8.2",
10
+ ch.rgw.utility;bundle-version="3.0.0",
11
+ ch.elexis.core.data;bundle-version="3.0.0",
12
+ ch.elexis.core.ui;bundle-version="3.0.0",
13
+ ch.elexis.core;bundle-version="3.0.0",
14
+ ch.elexis.core.ui.contacts;bundle-version="3.0.0",
15
+ ch.elexis.core.ui.icons;bundle-version="3.0.0",
16
+ ch.elexis.core.ui.laboratory;bundle-version="3.0.0",
17
+ ch.elexis.core.ui.medication;bundle-version="3.0.0"
18
+ Bundle-RequiredExecutionEnvironment: JavaSE-1.7
19
+ Bundle-ActivationPolicy: lazy
20
+ Import-Package: org.slf4j
21
+ Export-Package: ch.elexis.core.application,
22
+ ch.elexis.core.application.perspectives
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>ch.elexis.core.ui.contacts</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.pde.ManifestBuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ <buildCommand>
19
+ <name>org.eclipse.pde.SchemaBuilder</name>
20
+ <arguments>
21
+ </arguments>
22
+ </buildCommand>
23
+ <buildCommand>
24
+ <name>org.eclipse.pde.ds.core.builder</name>
25
+ <arguments>
26
+ </arguments>
27
+ </buildCommand>
28
+ </buildSpec>
29
+ <natures>
30
+ <nature>org.eclipse.pde.PluginNature</nature>
31
+ <nature>org.eclipse.jdt.core.javanature</nature>
32
+ </natures>
33
+ </projectDescription>
@@ -0,0 +1,32 @@
1
+ Manifest-Version: 1.0
2
+ Bundle-ManifestVersion: 2
3
+ Bundle-Name: Elexis Core Contacts
4
+ Bundle-SymbolicName: ch.elexis.core.ui.contacts;singleton:=true
5
+ Bundle-Version: 3.0.0.qualifier
6
+ Bundle-Activator: ch.elexis.core.ui.contacts.Activator
7
+ Bundle-Vendor: elexis.info
8
+ Bundle-Localization: plugin
9
+ Require-Bundle: org.eclipse.core.runtime,
10
+ org.eclipse.ui,
11
+ org.eclipse.ui.views;bundle-version="3.6.100",
12
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.300",
13
+ org.eclipse.ui.forms;bundle-version="3.5.200",
14
+ org.eclipse.core.databinding;bundle-version="1.4.1",
15
+ org.eclipse.core.databinding.beans;bundle-version="1.2.200",
16
+ org.eclipse.jface.databinding;bundle-version="1.6.0",
17
+ ch.rgw.utility;bundle-version="3.0.0",
18
+ ch.elexis.core;bundle-version="3.0.0",
19
+ ch.elexis.core.data;bundle-version="3.0.0",
20
+ ch.elexis.core.ui;bundle-version="3.0.0",
21
+ ch.elexis.core.ui.icons;bundle-version="3.0.0",
22
+ ch.elexis.core.ui.medication;bundle-version="3.0.0",
23
+ org.apache.commons.jexl;bundle-version="2.1.1"
24
+ Bundle-RequiredExecutionEnvironment: JavaSE-1.7
25
+ Bundle-ActivationPolicy: lazy
26
+ Export-Package: ch.elexis.core.ui.contacts.dialogs,
27
+ ch.elexis.core.ui.contacts.perspectives,
28
+ ch.elexis.core.ui.contacts.preferences,
29
+ ch.elexis.core.ui.contacts.views
30
+ Import-Package: ch.elexis.data,
31
+ org.slf4j;version="1.7.2"
32
+ Bundle-ClassPath: .
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>ch.elexis.icpc.feature</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.pde.FeatureBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.eclipse.pde.FeatureNature</nature>
16
+ </natures>
17
+ </projectDescription>
18
+
@@ -0,0 +1 @@
1
+ bin.includes = feature.xml
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <feature
3
+ id="ch.elexis.icpc.feature"
4
+ label="Unterstützt ICPC-2 (ohne Daten)"
5
+ version="3.0.0.qualifier"
6
+ provider-name="ch.elexis">
7
+
8
+ <description>
9
+ ICPC-2, die *I*nternational *C*lassification of *P*rimary *C*are ist ein Codierungswerkzeug für die Bedürfnise der Grundversorger und versucht deren Tätigkeit besser abzubilden, als dies mit Codierungssystemen wie ICD-10 möglich ist.
10
+
11
+ Der Ansatz des Hausarztes ist meist ‘Grundzentriert’ und nicht ‘Diagnosezentriert’: Die erste Frage ist ‘Warum kommt der Patient?’ Dementsprechend kommen hier oft Bezeichnungen zur Anwendung, die in bekannten Codesystemen wie ICD-10 oder CHOP nicht gut codiert werden können (‘Unwohlsein’, oder ‘Angst vor Krebs’ etc.). ICPC erlaubt also die Abbildung der Tätigkeit des Hausarztes und ist darum ein geeignetes Werkzeug, um sowohl abrechnungsstatistische als auch wissenschaftliche Daten dieser Tätigkeit zu erheben. Gleichzeitig ist ICPC nach einer gewissen Eingewöhnungszeit auch sehr einfach in der Anwendung – Die Codierung ist viel weniger zeitraubend, als mit ICD-10, da der Code weniger umfangreich und stärker ‘Grundzentriert’ ist, wie wir unten weiter ausführen werden.
12
+
13
+ ICPC ist lizenzpflichtig. Inhaber der Lizenz für die Schweiz ist die Schweizerische Gesellschaft für Allgemeinmedizin (SGAM). Man kann sich dort gegen eine Gebühr registrieren lassen und erhält dann eine Datenbank mit der aktuellen Codeversion. Näheres s. http://www.icpc.ch. In Elexis ist nur die Infrastruktur vorhanden, um diese Datenbank einzulesen. Die Daten selbst muss der interessierte Anwender selbst besorgen.
14
+ </description>
15
+
16
+ <copyright url="http://elexis.info/de_contributers.html">
17
+ Gerry Weirich, 2007-2013 und viele andere
18
+ </copyright>
19
+
20
+ <license url="http://www.eclipse.org/legal/epl-v10.html">
21
+ Eclipse Public License v1.0
22
+ </license>
23
+
24
+ <plugin
25
+ id="ch.elexis.icpc"
26
+ download-size="0"
27
+ install-size="0"
28
+ version="0.0.0"
29
+ unpack="false"/>
30
+
31
+ </feature>
32
+
@@ -0,0 +1,13 @@
1
+ <project xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd' xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
2
+ <modelVersion>4.0.0</modelVersion>
3
+ <parent>
4
+ <groupId>ch.elexis.base</groupId>
5
+ <artifactId>elexis-3-base</artifactId>
6
+ <version>3.0.0-SNAPSHOT</version>
7
+ </parent>
8
+ <groupId>ch.elexis.base</groupId>
9
+ <artifactId>ch.elexis.icpc.feature</artifactId>
10
+ <version>3.0.0-SNAPSHOT</version>
11
+ <packaging>eclipse-feature</packaging>
12
+
13
+ </project>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>ch.elexis.icpc</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.pde.ManifestBuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ <buildCommand>
19
+ <name>org.eclipse.pde.SchemaBuilder</name>
20
+ <arguments>
21
+ </arguments>
22
+ </buildCommand>
23
+ </buildSpec>
24
+ <natures>
25
+ <nature>org.eclipse.pde.PluginNature</nature>
26
+ <nature>org.eclipse.jdt.core.javanature</nature>
27
+ </natures>
28
+ </projectDescription>
@@ -0,0 +1,26 @@
1
+ Manifest-Version: 1.0
2
+ Bundle-ManifestVersion: 2
3
+ Bundle-Name: Elexis Plugin für ICPC 2
4
+ Bundle-SymbolicName: ch.elexis.icpc;singleton:=true
5
+ Bundle-Version: 3.0.0.qualifier
6
+ Bundle-Vendor: elexis.ch
7
+ Bundle-Localization: plugin
8
+ Require-Bundle: ch.elexis.core;bundle-version="3.0.0",
9
+ ch.elexis.core.data;bundle-version="3.0.0",
10
+ ch.elexis.core.ui;bundle-version="3.0.0",
11
+ ch.elexis.core.ui.icons;bundle-version="3.0.0",
12
+ ch.elexis.core.ui.importer.div;bundle-version="3.0.0",
13
+ ch.rgw.utility,
14
+ org.eclipse.core.runtime,
15
+ org.eclipse.ui,
16
+ org.eclipse.ui.forms,
17
+ com.healthmarketscience.jackcess,
18
+ ch.elexis.core.ui.medication,
19
+ ch.elexis.core.ui.laboratory,
20
+ ch.elexis.core.ui.contacts
21
+ Eclipse-LazyStart: false
22
+ Bundle-Activator: ch.elexis.icpc.Activator
23
+ Export-Package: ch.elexis.icpc; uses:="org.eclipse.core.runtime, ch.rgw.tools, ch.elexis.actions, ch.elexis.util, ch.elexis.data, ch.elexis.views.codesystems, ch.elexis.icpc.views, org.eclipse.ui, org.eclipse.swt.custom, org.eclipse.ui.plugin, org.eclipse.ui.forms.widgets, org.eclipse.osgi.util, ch.elexis.text, ch.elexis.views, ch.elexis.util.viewers, org.eclipse.jface.viewers, org.osgi.framework, org.eclipse.swt.widgets"
24
+ Created-By: Buildr
25
+ Bundle-RequiredExecutionEnvironment: JavaSE-1.7
26
+
@@ -0,0 +1,74 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?eclipse version="3.1"?>
3
+ <plugin>
4
+ <extension
5
+ point="ch.elexis.core.ui.Diagnosecode">
6
+ <Diagnosesystem
7
+ CodeDetailDisplay="ch.elexis.icpc.DetailDisplay"
8
+ CodeSelectorFactory="ch.elexis.icpc.CodeSelectorFactory"
9
+ ElementFactory="ch.elexis.icpc.IcpcFactory"
10
+ ImporterClass="ch.elexis.icpc.IcpcImporter"
11
+ name="ICPC2"/>
12
+ </extension>
13
+ <extension
14
+ point="ch.elexis.core.data.PersistentReference">
15
+ <Factory
16
+ Class="ch.elexis.icpc.IcpcFactory"
17
+ name="IcpcFactory"/>
18
+ </extension>
19
+ <extension
20
+ point="ch.elexis.core.data.DataAccess">
21
+ <DataAccess
22
+ class="ch.elexis.icpc.DataAccessor"
23
+ name="ICPC">
24
+ </DataAccess>
25
+ </extension>
26
+ <extension
27
+ point="org.eclipse.ui.views">
28
+ <category
29
+ id="ch.elexis.icpcCategory"
30
+ name="ICPC"/>
31
+ <view
32
+ category="ch.elexis.icpcCategory"
33
+ class="ch.elexis.icpc.views.EpisodesView"
34
+ icon="icons/wonca16.png"
35
+ id="ch.elexis.icpc.episodesView"
36
+ name="Probleme"/>
37
+ <view
38
+ category="ch.elexis.icpcCategory"
39
+ class="ch.elexis.icpc.views.EncounterView"
40
+ icon="icons/wonca16.png"
41
+ id="ch.elexis.icpc.encounterView"
42
+ name="Encounters"/>
43
+ <view
44
+ allowMultiple="false"
45
+ category="ch.elexis.icpcCategory"
46
+ class="ch.elexis.icpc.views.ICPCCodesView"
47
+ icon="icons/wonca16.png"
48
+ id="ch.elexis.icpc.codesView"
49
+ name="ICPC2-Codes">
50
+ </view>
51
+ </extension>
52
+ <extension
53
+ point="org.eclipse.ui.perspectives">
54
+ <perspective
55
+ class="ch.elexis.icpc.views.IcpcPerspektive"
56
+ fixed="false"
57
+ icon="icons/wonca16.png"
58
+ id="ch.elexis.icpc.perspective"
59
+ name="ICPC "/>
60
+ </extension>
61
+ <extension
62
+ point="ch.elexis.core.ui.KonsExtension">
63
+ <Link
64
+ KonsExtension="ch.elexis.icpc.KonsExtension"
65
+ name="ICPC"/>
66
+ </extension>
67
+ <extension
68
+ point="ch.elexis.core.ui.Sidebar">
69
+ <Perspektive
70
+ ID="ch.elexis.icpc.perspective"
71
+ name="ICPC-2"/>
72
+ </extension>
73
+
74
+ </plugin>
data/spec/plugin_spec.rb CHANGED
@@ -15,18 +15,6 @@ describe 'Plugin' do
15
15
  @dataDir = File.expand_path(File.join(File.dirname(__FILE__), 'data'))
16
16
  end
17
17
 
18
- it "should run the readme example" do
19
- require 'eclipse/plugin'
20
- workspace = Eclipse::Workspace.new(@dataDir)
21
- workspace.parsePluginDir
22
- workspace.views.first {|view| puts view.id }
23
- workspace.views.size.should == 49
24
- workspace.view_categories.size.should == 7
25
- workspace.preferencePages.size.should == 3
26
- workspace.preferencePage_categories.size.should == 1
27
- workspace.perspectives.size.should == 7
28
- end
29
-
30
18
  it "must be able to analyse a plugin.xml without localization" do
31
19
  plugin = File.join(@dataDir, 'plugins', JAR_WITHOUT_LOCALIZE)
32
20
  info = Eclipse::Plugin::Info.new(plugin)
@@ -87,28 +75,12 @@ describe 'Plugin' do
87
75
 
88
76
  it "should work with a source plugin" do
89
77
  info = Eclipse::Plugin::Info.new(File.join(@dataDir, 'source', 'ch.elexis.core.ui.contacts'))
78
+ info.jar_or_src.should_not be nil
90
79
  info.views.first.should_not be nil
91
80
  info.perspectives.first.should_not be nil
92
81
  info.preferencePages.first.should_not be nil
93
82
  info.view_categories.first.should_not be nil
94
83
  # info.preferencePage_categories.first.should_not be nil
95
84
  end
96
-
97
- it "should work with a source workspace" do
98
- plugin = File.join('/opt/src/elexis-3-core')
99
- workspace = Eclipse::Workspace.new(File.join(@dataDir, 'source'))
100
- workspace.parse_sub_dirs
101
- workspace.views.first.should_not be nil
102
- workspace.perspectives.first.should_not be nil
103
- workspace.preferencePages.first.should_not be nil
104
- workspace.view_categories.first.should_not be nil
105
- workspace.preferencePage_categories.first.should be nil
106
- workspace.views.size.should == 49
107
- workspace.view_categories.size.should == 7
108
- workspace.preferencePages.size.should == 1
109
- workspace.preferencePage_categories.size.should == 0
110
- workspace.perspectives.size.should == 8
111
- end
112
-
113
85
 
114
86
  end
@@ -0,0 +1,41 @@
1
+ #encoding : utf-8
2
+ require 'spec_helper'
3
+
4
+ require 'eclipse/workspace'
5
+
6
+ describe 'workspace' do
7
+
8
+ before :all do
9
+ @dataDir = File.expand_path(File.join(File.dirname(__FILE__), 'data'))
10
+ end
11
+
12
+ it "should run the readme example" do
13
+ require 'eclipse/plugin'
14
+ workspace = Eclipse::Workspace.new(@dataDir)
15
+ workspace.parsePluginDir
16
+ workspace.views.first {|view| puts view.id }
17
+ workspace.views.size.should == 49
18
+ workspace.view_categories.size.should == 7
19
+ workspace.preferencePages.size.should == 3
20
+ workspace.preferencePage_categories.size.should == 1
21
+ workspace.perspectives.size.should == 7
22
+ end
23
+
24
+ it "should work with a source workspace" do
25
+ plugin = File.join('/opt/src/elexis-3-core')
26
+ workspace = Eclipse::Workspace.new(File.join(@dataDir, 'source'))
27
+ workspace.parse_sub_dirs
28
+ workspace.views.first.should_not be nil
29
+ workspace.perspectives.first.should_not be nil
30
+ workspace.preferencePages.first.should_not be nil
31
+ workspace.view_categories.first.should_not be nil
32
+ workspace.preferencePage_categories.first.should be nil
33
+ workspace.views.size.should == 52
34
+ workspace.view_categories.size.should == 8
35
+ workspace.preferencePages.size.should == 1
36
+ workspace.preferencePage_categories.size.should == 0
37
+ workspace.perspectives.size.should == 9
38
+ workspace.plugins.size.should == 3
39
+ end
40
+
41
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eclipse-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: '0.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklaus Giger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -99,23 +99,36 @@ files:
99
99
  - lib/eclipse/helpers.rb
100
100
  - lib/eclipse/plugin.rb
101
101
  - lib/eclipse/plugin/version.rb
102
+ - lib/eclipse/workspace.rb
102
103
  - spec/data/plugin_de.properties
103
104
  - spec/data/plugins/ch.elexis.core.application_3.0.0.v20140314-1352.jar
104
105
  - spec/data/plugins/ch.elexis.laborimport.hl7.allg-3.0.0-SNAPSHOT.jar
105
106
  - spec/data/plugins/org.iatrix_3.0.0.v20140313-1017.jar
107
+ - spec/data/source/ch.elexis.core.application/.project
108
+ - spec/data/source/ch.elexis.core.application/META-INF/MANIFEST.MF
106
109
  - spec/data/source/ch.elexis.core.application/plugin.properties
107
110
  - spec/data/source/ch.elexis.core.application/plugin.xml
108
111
  - spec/data/source/ch.elexis.core.application/plugin_de.properties
109
112
  - spec/data/source/ch.elexis.core.application/plugin_en.properties
110
113
  - spec/data/source/ch.elexis.core.application/plugin_fr.properties
114
+ - spec/data/source/ch.elexis.core.ui.contacts/.project
115
+ - spec/data/source/ch.elexis.core.ui.contacts/META-INF/MANIFEST.MF
111
116
  - spec/data/source/ch.elexis.core.ui.contacts/plugin.properties
112
117
  - spec/data/source/ch.elexis.core.ui.contacts/plugin.xml
113
118
  - spec/data/source/ch.elexis.core.ui.contacts/plugin_de.properties
114
119
  - spec/data/source/ch.elexis.core.ui.contacts/plugin_en.properties
115
120
  - spec/data/source/ch.elexis.core.ui.contacts/plugin_fr.properties
121
+ - spec/data/source/ch.elexis.icpc.feature/.project
122
+ - spec/data/source/ch.elexis.icpc.feature/build.properties
123
+ - spec/data/source/ch.elexis.icpc.feature/feature.xml
124
+ - spec/data/source/ch.elexis.icpc.feature/pom.xml
125
+ - spec/data/source/ch.elexis.icpc/.project
126
+ - spec/data/source/ch.elexis.icpc/META-INF/MANIFEST.MF
127
+ - spec/data/source/ch.elexis.icpc/plugin.xml
116
128
  - spec/helpers_spec.rb
117
129
  - spec/plugin_spec.rb
118
130
  - spec/spec_helper.rb
131
+ - spec/workspace_spec.rb
119
132
  homepage: ''
120
133
  licenses:
121
134
  - GPLv3
@@ -146,16 +159,28 @@ test_files:
146
159
  - spec/data/plugins/ch.elexis.core.application_3.0.0.v20140314-1352.jar
147
160
  - spec/data/plugins/ch.elexis.laborimport.hl7.allg-3.0.0-SNAPSHOT.jar
148
161
  - spec/data/plugins/org.iatrix_3.0.0.v20140313-1017.jar
162
+ - spec/data/source/ch.elexis.core.application/.project
163
+ - spec/data/source/ch.elexis.core.application/META-INF/MANIFEST.MF
149
164
  - spec/data/source/ch.elexis.core.application/plugin.properties
150
165
  - spec/data/source/ch.elexis.core.application/plugin.xml
151
166
  - spec/data/source/ch.elexis.core.application/plugin_de.properties
152
167
  - spec/data/source/ch.elexis.core.application/plugin_en.properties
153
168
  - spec/data/source/ch.elexis.core.application/plugin_fr.properties
169
+ - spec/data/source/ch.elexis.core.ui.contacts/.project
170
+ - spec/data/source/ch.elexis.core.ui.contacts/META-INF/MANIFEST.MF
154
171
  - spec/data/source/ch.elexis.core.ui.contacts/plugin.properties
155
172
  - spec/data/source/ch.elexis.core.ui.contacts/plugin.xml
156
173
  - spec/data/source/ch.elexis.core.ui.contacts/plugin_de.properties
157
174
  - spec/data/source/ch.elexis.core.ui.contacts/plugin_en.properties
158
175
  - spec/data/source/ch.elexis.core.ui.contacts/plugin_fr.properties
176
+ - spec/data/source/ch.elexis.icpc.feature/.project
177
+ - spec/data/source/ch.elexis.icpc.feature/build.properties
178
+ - spec/data/source/ch.elexis.icpc.feature/feature.xml
179
+ - spec/data/source/ch.elexis.icpc.feature/pom.xml
180
+ - spec/data/source/ch.elexis.icpc/.project
181
+ - spec/data/source/ch.elexis.icpc/META-INF/MANIFEST.MF
182
+ - spec/data/source/ch.elexis.icpc/plugin.xml
159
183
  - spec/helpers_spec.rb
160
184
  - spec/plugin_spec.rb
161
185
  - spec/spec_helper.rb
186
+ - spec/workspace_spec.rb