Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edu.msu.anr.osgi.structuralintegrity.viewtool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
canr
edu.msu.anr.osgi.structuralintegrity.viewtool
Commits
18b429e6
Commit
18b429e6
authored
8 years ago
by
Eric Slenk
Browse files
Options
Downloads
Patches
Plain Diff
Fix import, get and use service.
parent
58cb21a5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build.gradle
+2
-2
2 additions, 2 deletions
build.gradle
src/main/java/edu/msu/anr/osgi/structuralintegrity/viewtool/Activator.java
+12
-3
12 additions, 3 deletions
.../msu/anr/osgi/structuralintegrity/viewtool/Activator.java
with
14 additions
and
5 deletions
build.gradle
+
2
−
2
View file @
18b429e6
...
...
@@ -4,7 +4,7 @@ apply plugin: 'war'
apply
plugin:
'eclipse'
sourceCompatibility
=
'1.8'
version
=
'0.1.0-
3
'
version
=
'0.1.0-
7
'
repositories
{
...
...
@@ -30,7 +30,7 @@ jar {
instruction
'Bundle-Activator'
,
"${applicationName}.Activator"
instruction
'DynamicImport-Package'
,
'*'
instruction
'Import-Package'
,
''
+
'edu.msu.anr.osgi.structuralintegrity.service;version=1.0.2'
+
'edu.msu.anr.osgi.structuralintegrity.service;version=1.0.2
,
'
+
'*;version=0'
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/edu/msu/anr/osgi/structuralintegrity/viewtool/Activator.java
+
12
−
3
View file @
18b429e6
...
...
@@ -7,6 +7,8 @@ import com.dotmarketing.util.Logger;
import
edu.msu.anr.osgi.structuralintegrity.service.StructuresSnapshotService
;
import
java.io.File
;
public
class
Activator
extends
GenericBundleActivator
{
private
ServiceTracker
<
StructuresSnapshotService
,
StructuresSnapshotService
>
structuresSnapshotServiceTracker
;
...
...
@@ -20,15 +22,22 @@ public class Activator extends GenericBundleActivator {
// Create a ServiceTracker for the StructuresSnapshotService
try
{
structuresSnapshotServiceTracker
=
new
ServiceTracker
<>(
bundleContext
,
StructuresSnapshotService
.
class
.
getName
(),
null
bundleContext
,
StructuresSnapshotService
.
class
.
getName
(),
null
);
structuresSnapshotServiceTracker
.
open
();
}
catch
(
Exception
e
)
{
Logger
.
error
(
this
,
e
.
getMessage
());
throw
e
;
}
// Test service tracker
StructuresSnapshotService
service
=
(
StructuresSnapshotService
)
structuresSnapshotServiceTracker
.
getService
();
if
(
service
!=
null
)
{
File
[]
snapshotFiles
=
service
.
getSavedSnapshotFiles
();
}
//Registering the ViewTool service
registerViewToolService
(
bundleContext
,
new
StructuresSnapshotServiceToolInfo
()
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment