Skip to content

Commit eeec968

Browse files
committed
release 1.1.2 (idea 1.0.2)
1 parent 69f88ef commit eeec968

File tree

14 files changed

+216
-20
lines changed

14 files changed

+216
-20
lines changed

changelog.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
1.1.2 (maintenance)
1+
1.1.2 (22-nov-2015,maintenance)
22
- refactoring to increase compatibility with different IDEs
3-
- removed slf4j usage
3+
- removed logging with slf4j, added services to provide different logging for each IDE
44
- improved logic of opening file link in both IDEs
55
- changed byte-code version to Java 6 (but it still uses java.nio.file.Path from Java 7+)
66
- bug fixing in the IDEA version (1.0.2), changed minimal IDEA version to IDEA 13 (133 build), but it should be started under Java 7+
77

8-
1.1.1 (maintenance)
8+
1.1.1 (15-nov-2015,maintenance)
99
- very small refactoring
1010
- added support of word-wrap mode change into the plain text editor
1111
- improved focus loose processing for topic text editor, now the editing text saved if editor lost focus (issue #1)

mind-map/idea-mindmap/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]]></description>
1818

1919
<change-notes><![CDATA[
20-
<p>1.0.2 (in development)</p>
20+
<p>1.0.2 (21-nov-2015)</p>
2121
<ul>
2222
<li>Improved opening of file link</li>
2323
<li>Added option into facet to disable auto-generation of .projectKnowledge folder in the root</li>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.igormaznitsa.ideamindmap.utils.logger.IdeaLoggerService
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2015 Igor Maznitsa.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.igormaznitsa.ideamindmap.utils.logger;
17+
18+
import com.igormaznitsa.mindmap.model.logger.Logger;
19+
20+
public class IdeaLogger extends Logger{
21+
22+
private final com.intellij.openapi.diagnostic.Logger wrappedLogger;
23+
24+
public IdeaLogger(final String category){
25+
super(category);
26+
this.wrappedLogger = com.intellij.openapi.diagnostic.Logger.getInstance(category);
27+
}
28+
29+
public IdeaLogger(final Class<?> aClass){
30+
super(aClass);
31+
this.wrappedLogger = com.intellij.openapi.diagnostic.Logger.getInstance(aClass);
32+
}
33+
34+
@Override public void info(final String message) {
35+
this.wrappedLogger.info(message);
36+
}
37+
38+
@Override public void warn(final String message) {
39+
this.wrappedLogger.warn(message);
40+
}
41+
42+
@Override public void error(final String message) {
43+
this.wrappedLogger.error(message);
44+
}
45+
46+
@Override public void error(final String message, final Throwable throwable) {
47+
this.wrappedLogger.error(message,throwable);
48+
}
49+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright 2015 Igor Maznitsa.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.igormaznitsa.ideamindmap.utils.logger;
17+
18+
import com.igormaznitsa.mindmap.model.logger.Logger;
19+
import com.igormaznitsa.mindmap.model.logger.LoggerService;
20+
import com.intellij.util.containers.HashMap;
21+
import org.jetbrains.annotations.NotNull;
22+
23+
import java.util.Map;
24+
25+
public class IdeaLoggerService implements LoggerService {
26+
27+
private final Map<Class<?>, Logger> cacheForClass = new HashMap<Class<?>,Logger>();
28+
private final Map<String, Logger> cacheForCategory = new HashMap<String,Logger>();
29+
30+
@Override public Logger getLogger(@NotNull final Class<?> aClass) {
31+
synchronized (this.cacheForClass){
32+
Logger result = this.cacheForClass.get(aClass);
33+
if (result == null){
34+
result = new IdeaLogger(aClass);
35+
cacheForClass.put(aClass,result);
36+
}
37+
return result;
38+
}
39+
}
40+
41+
@Override public Logger getLogger(@NotNull final String category) {
42+
synchronized (this.cacheForCategory){
43+
Logger result = this.cacheForCategory.get(category);
44+
if (result == null){
45+
result = new IdeaLogger(category);
46+
this.cacheForCategory.put(category,result);
47+
}
48+
return result;
49+
}
50+
}
51+
}

mind-map/mind-map-model/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<parent>
55
<groupId>com.igormaznitsa</groupId>
66
<artifactId>mind-map</artifactId>
7-
<version>1.0.1-SNAPSHOT</version>
7+
<version>1.0.1</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010

1111
<artifactId>mind-map-model</artifactId>
12-
<version>1.0.2-SNAPSHOT</version>
12+
<version>1.0.2</version>
1313
<packaging>jar</packaging>
1414

1515
<description>Abstract mind map model</description>

mind-map/mind-map-model/src/main/java/com/igormaznitsa/mindmap/model/logger/LoggerFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public class LoggerFactory {
2424
private static final LoggerService LOGGER_SERVICE;
2525

2626
static {
27-
final ServiceLoader<LoggerService> service = ServiceLoader.load(LoggerService.class);
27+
final ServiceLoader<LoggerService> service = ServiceLoader.load(LoggerService.class, LoggerFactory.class.getClassLoader());
28+
service.reload();
2829
final Iterator<LoggerService> iterator = service.iterator();
2930
LOGGER_SERVICE = iterator.hasNext() ? iterator.next() : new JavaLoggerServiceImpl();
3031
LOGGER_SERVICE.getLogger(LoggerFactory.class).info("Detected MindMap Logger Service: "+LOGGER_SERVICE.getClass().getName());

mind-map/mind-map-model/src/main/java/com/igormaznitsa/mindmap/model/logger/impl/JavaLoggerServiceImpl.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,36 @@
1717

1818
import com.igormaznitsa.mindmap.model.logger.Logger;
1919
import com.igormaznitsa.mindmap.model.logger.LoggerService;
20+
import java.util.HashMap;
21+
import java.util.Map;
2022

2123
public class JavaLoggerServiceImpl implements LoggerService {
2224

25+
private final Map<Class<?>,Logger> cacheForClasses = new HashMap<Class<?>, Logger>();
26+
private final Map<String,Logger> cacheForNames = new HashMap<String, Logger>();
27+
2328
@Override
2429
public Logger getLogger (final Class<?> klazz) {
25-
return new JavaLogger(klazz);
30+
synchronized(this.cacheForClasses){
31+
Logger result = this.cacheForClasses.get(klazz);
32+
if(result == null){
33+
result = new JavaLogger(klazz);
34+
this.cacheForClasses.put(klazz, result);
35+
}
36+
return result;
37+
}
2638
}
2739

2840
@Override
2941
public Logger getLogger (final String name) {
30-
return new JavaLogger(name);
42+
synchronized (this.cacheForNames) {
43+
Logger result = this.cacheForNames.get(name);
44+
if (result == null) {
45+
result = new JavaLogger(name);
46+
this.cacheForNames.put(name, result);
47+
}
48+
return result;
49+
}
3150
}
3251

3352
}

mind-map/mind-map-model/src/main/java/com/igormaznitsa/mindmap/model/nio/Paths.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public enum Paths {
3030
private static final PathService PATH_SERVICE;
3131

3232
static {
33-
final ServiceLoader<PathService> service = ServiceLoader.load(PathService.class);
33+
final ServiceLoader<PathService> service = ServiceLoader.load(PathService.class, Paths.class.getClassLoader());
34+
service.reload();
3435
final Iterator<PathService> iterator = service.iterator();
3536
PATH_SERVICE = iterator.hasNext() ? iterator.next() : new J7PathService();
3637

mind-map/mind-map-swing-panel/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<parent>
55
<groupId>com.igormaznitsa</groupId>
66
<artifactId>mind-map</artifactId>
7-
<version>1.0.1-SNAPSHOT</version>
7+
<version>1.0.1</version>
88
</parent>
99

1010
<artifactId>mind-map-swing-panel</artifactId>
11-
<version>1.0.3-SNAPSHOT</version>
11+
<version>1.0.3</version>
1212
<packaging>jar</packaging>
1313

1414
<description>Swing based panel to show and interact with mind map</description>
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>com.igormaznitsa</groupId>
1919
<artifactId>mind-map-model</artifactId>
20-
<version>1.0.2-SNAPSHOT</version>
20+
<version>1.0.2</version>
2121
<optional>true</optional>
2222
</dependency>
2323
<dependency>

mind-map/nb-mind-map/.projectKnowledge/Main.mmd

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ Mind Map generated by NB MindMap plugin
7474

7575
##### Drag and drop topics from Navigator and<br/>make jumps to them automatically
7676

77+
##### Improve work with \.projectKnowledge folder<br/>in NetBeans
78+
> fillColor=`#FF6666`
79+
80+
81+
###### create folders
82+
> fillColor=`#FF6666`
83+
84+
85+
###### focus to documents<br/>in the folder
86+
> fillColor=`#FFCC00`
87+
88+
7789
#### UI
7890
> fillColor=`#EC98FF`
7991

@@ -177,3 +189,65 @@ NB! Don't forget to initialize it by providing of lookup (it finds Scopeprovider
177189

178190
- FILE
179191
<pre>file:///home/igorm/Projects_PET/MindMap/mind-map/idea-mindmap</pre>
192+
193+
## Q&A<br/>check list
194+
> fillColor=`#99FF99`,collapsed=`true`
195+
196+
197+
### Check installation
198+
199+
### Check configuration
200+
201+
### Check creation of new topics
202+
203+
### Check keyboard navigation
204+
205+
### Check D&D for topics
206+
207+
### Check EXTRAs
208+
> fillColor=`#00FFCC`,collapsed=`true`
209+
210+
211+
#### Check 'Note'
212+
213+
##### Add
214+
215+
##### Open
216+
217+
##### Edit
218+
219+
##### Remove
220+
221+
#### Check 'Jump'
222+
223+
##### Add
224+
225+
##### Click
226+
227+
##### Edit
228+
229+
##### Remove
230+
231+
#### Check 'URI'
232+
233+
##### Add
234+
235+
##### Open
236+
237+
##### Edit
238+
239+
##### Remove
240+
241+
#### Check 'File'
242+
243+
##### Add
244+
245+
##### Open
246+
247+
##### Edit
248+
249+
##### Remove
250+
251+
### Check D&D files<br/>from project tree
252+
253+
### Check export

mind-map/nb-mind-map/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
<parent>
66
<groupId>com.igormaznitsa</groupId>
77
<artifactId>mind-map</artifactId>
8-
<version>1.0.1-SNAPSHOT</version>
8+
<version>1.0.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

1212
<artifactId>nb-mind-map</artifactId>
13-
<version>1.1.2-SNAPSHOT</version>
13+
<version>1.1.2</version>
1414
<packaging>nbm</packaging>
1515

1616
<name>NetBeans Mind Map Editor plugin</name>
1717
<description>NetBeans editor plugin to create and edit mind maps within NetBeans IDE projects.</description>
1818

19-
<url>https://github.com/raydac/netbeans-mmd-plugin</url>
19+
<url>http://www.igormaznitsa.com/netbeans-mmd-plugin/</url>
2020

2121
<properties>
2222
<nb.platform>RELEASE74</nb.platform>
@@ -115,12 +115,12 @@
115115
<dependency>
116116
<groupId>com.igormaznitsa</groupId>
117117
<artifactId>mind-map-model</artifactId>
118-
<version>1.0.2-SNAPSHOT</version>
118+
<version>1.0.2</version>
119119
</dependency>
120120
<dependency>
121121
<groupId>com.igormaznitsa</groupId>
122122
<artifactId>mind-map-swing-panel</artifactId>
123-
<version>1.0.3-SNAPSHOT</version>
123+
<version>1.0.3</version>
124124
</dependency>
125125

126126
<dependency>

mind-map/nb-mind-map/src/main/java/com/igormaznitsa/nbmindmap/utils/NbUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ public static FileEditPanel.DataContainer editFilePath (final String title, fina
341341
if (result != null) {
342342
if (!result.isValid()) {
343343
NbUtils.msgError(String.format(java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("MMDGraphEditor.editFileLinkForTopic.errorCantFindFile"), result.getPath()));
344+
result = null;
344345
}
345-
result = null;
346346
}
347347
}
348348
return result;

mind-map/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.igormaznitsa</groupId>
55
<artifactId>mind-map</artifactId>
6-
<version>1.0.1-SNAPSHOT</version>
6+
<version>1.0.1</version>
77
<packaging>pom</packaging>
88

99
<inceptionYear>2015</inceptionYear>

0 commit comments

Comments
 (0)