From fe75728b3c706a8b29d754b53f74c748901a7a1d Mon Sep 17 00:00:00 2001 From: cnfree Date: Fri, 27 May 2016 19:41:44 +0800 Subject: [PATCH] I18N --- .../decompiler/jd/decompiler/JDCoreDecompiler.java | 6 +++--- .../decompiler/update/DecompilerUpdateHandler.java | 8 ++++---- .../mpc/ui/market/client/DecompilerSelectionModel.java | 2 +- .../decompiler/editor/JavaDecompilerBufferManager.java | 8 ++++---- .../decompiler/fernflower/FernFlowerDecompiler.java | 4 ++-- .../sf/feeling/decompiler/util/DecompilerOutputUtil.java | 4 ++-- .../src/org/sf/feeling/decompiler/util/FileUtil.java | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/org.sf.feeling.decompiler.jd/src/org/sf/feeling/decompiler/jd/decompiler/JDCoreDecompiler.java b/org.sf.feeling.decompiler.jd/src/org/sf/feeling/decompiler/jd/decompiler/JDCoreDecompiler.java index 0ca7e77..4b02e84 100644 --- a/org.sf.feeling.decompiler.jd/src/org/sf/feeling/decompiler/jd/decompiler/JDCoreDecompiler.java +++ b/org.sf.feeling.decompiler.jd/src/org/sf/feeling/decompiler/jd/decompiler/JDCoreDecompiler.java @@ -75,8 +75,8 @@ public void decompile( String root, String classPackage, String className ) true, new LazyLoader( null ) ); structClass.releaseResources( ); - classPackage = structClass.qualifiedName.replace( "/" - + className.replaceAll( "(?i)\\.class", "" ), "" ); + classPackage = structClass.qualifiedName.replace( "/" //$NON-NLS-1$ + + className.replaceAll( "(?i)\\.class", "" ), "" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } FileUtil.zipDir( workingDir, classPackage, zipFileName ); @@ -90,7 +90,7 @@ public void decompile( String root, String classPackage, String className ) } source = mapper.decompile( zipFileName, - ( classPackage.length( ) > 0 ? ( classPackage + "/" ) : "" ) + ( classPackage.length( ) > 0 ? ( classPackage + "/" ) : "" ) //$NON-NLS-1$ //$NON-NLS-2$ + className ); zipFile.delete( ); diff --git a/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdateHandler.java b/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdateHandler.java index f5bc541..cc181a3 100644 --- a/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdateHandler.java +++ b/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdateHandler.java @@ -191,19 +191,19 @@ public static String getUpdateUrl( Class nodeClass, IProgressMonitor monitor ) t Object node = nodeClass.newInstance( ); - ReflectionUtils.invokeMethod( node, "setId", new Class[]{ + ReflectionUtils.invokeMethod( node, "setId", new Class[]{ //$NON-NLS-1$ String.class }, new Object[]{ - "472922" + "472922" //$NON-NLS-1$ } ); - node = ReflectionUtils.invokeMethod( service, "getNode", new Class[]{ + node = ReflectionUtils.invokeMethod( service, "getNode", new Class[]{ //$NON-NLS-1$ nodeClass, IProgressMonitor.class }, new Object[]{ node, monitor } ); - return (String) ReflectionUtils.invokeMethod( node, "getUpdateurl", new Class[]{}, new Object[]{} ); + return (String) ReflectionUtils.invokeMethod( node, "getUpdateurl", new Class[]{}, new Object[]{} ); //$NON-NLS-1$ } private String getVersion( OSGiVersion remoteVersion ) diff --git a/org.sf.feeling.decompiler.update/src/org/sf/feeling/mars/mpc/ui/market/client/DecompilerSelectionModel.java b/org.sf.feeling.decompiler.update/src/org/sf/feeling/mars/mpc/ui/market/client/DecompilerSelectionModel.java index e033eb4..bb54e71 100644 --- a/org.sf.feeling.decompiler.update/src/org/sf/feeling/mars/mpc/ui/market/client/DecompilerSelectionModel.java +++ b/org.sf.feeling.decompiler.update/src/org/sf/feeling/mars/mpc/ui/market/client/DecompilerSelectionModel.java @@ -47,7 +47,7 @@ public Set getSelectedCatalogItems( ) items.add( getEntryItem( entry ) ); } } - ReflectionUtils.setFieldValue( entry, "operation", Operation.CHANGE ); + ReflectionUtils.setFieldValue( entry, "operation", Operation.CHANGE ); //$NON-NLS-1$ } } return Collections.unmodifiableSet( items ); diff --git a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/editor/JavaDecompilerBufferManager.java b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/editor/JavaDecompilerBufferManager.java index 26b3fdd..3f92cf1 100644 --- a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/editor/JavaDecompilerBufferManager.java +++ b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/editor/JavaDecompilerBufferManager.java @@ -167,12 +167,12 @@ private boolean requestFromJavadocHover( ) StackTraceElement[] stacks = Thread.currentThread( ).getStackTrace( ); for ( int i = 0; i < stacks.length; i++ ) { - if ( stacks[i].getClassName( ).indexOf( "BinaryType" ) != -1 - && stacks[i].getMethodName( ).equals( "getJavadocRange" ) ) + if ( stacks[i].getClassName( ).indexOf( "BinaryType" ) != -1 //$NON-NLS-1$ + && stacks[i].getMethodName( ).equals( "getJavadocRange" ) ) //$NON-NLS-1$ return false; - if ( stacks[i].getClassName( ).indexOf( "JavadocHover" ) != -1 - && stacks[i].getMethodName( ).equals( "getHoverInfo" ) ) + if ( stacks[i].getClassName( ).indexOf( "JavadocHover" ) != -1 //$NON-NLS-1$ + && stacks[i].getMethodName( ).equals( "getHoverInfo" ) ) //$NON-NLS-1$ return true; } return false; diff --git a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/fernflower/FernFlowerDecompiler.java b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/fernflower/FernFlowerDecompiler.java index 5ed2888..17e40ed 100644 --- a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/fernflower/FernFlowerDecompiler.java +++ b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/fernflower/FernFlowerDecompiler.java @@ -55,8 +55,8 @@ public void decompile( String root, String packege, String className ) mapOptions.put( IFernflowerPreferences.REMOVE_SYNTHETIC, "1" ); //$NON-NLS-1$ mapOptions.put( IFernflowerPreferences.DECOMPILE_GENERIC_SIGNATURES, "1" ); //$NON-NLS-1$ - mapOptions.put( IFernflowerPreferences.DECOMPILE_INNER, "1" ); - mapOptions.put( IFernflowerPreferences.DECOMPILE_ENUM, "1" ); + mapOptions.put( IFernflowerPreferences.DECOMPILE_INNER, "1" ); //$NON-NLS-1$ + mapOptions.put( IFernflowerPreferences.DECOMPILE_ENUM, "1" ); //$NON-NLS-1$ mapOptions.put( IFernflowerPreferences.LOG_LEVEL, IFernflowerLogger.Severity.ERROR.name( ) ); mapOptions.put( IFernflowerPreferences.ASCII_STRING_CHARACTERS, "1" ); //$NON-NLS-1$ diff --git a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/DecompilerOutputUtil.java b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/DecompilerOutputUtil.java index a1de1d6..e982c22 100644 --- a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/DecompilerOutputUtil.java +++ b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/DecompilerOutputUtil.java @@ -274,7 +274,7 @@ public String toString( ) - line_separator.length( ) ) { realignOutput.replace( index, index - + line_separator.length( ), "" ); + + line_separator.length( ), "" ); //$NON-NLS-1$ for ( int j = 0; j < beforeLines.size( ); j++ ) { @@ -370,7 +370,7 @@ private String getLineNumber( int i, int lineNumberWidth ) if ( i == -1 ) { width = 0; - number = ""; + number = ""; //$NON-NLS-1$ } if ( width < lineNumberWidth ) { diff --git a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/FileUtil.java b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/FileUtil.java index 34a2239..e2e5d58 100644 --- a/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/FileUtil.java +++ b/org.sf.feeling.decompiler/src/org/sf/feeling/decompiler/util/FileUtil.java @@ -447,7 +447,7 @@ public static void zipDir( File dir, String classPackage, String zipFile ) File file = files[i]; if(file.isDirectory( )) continue; - ze = new ZipEntry( ( classPackage.length( ) > 0 ? ( classPackage + "/" ) : "" ) + file.getName( ) ); //$NON-NLS-1$ + ze = new ZipEntry( ( classPackage.length( ) > 0 ? ( classPackage + "/" ) : "" ) + file.getName( ) ); //$NON-NLS-1$ //$NON-NLS-2$ ze.setSize( file.length( ) ); ze.setTime( file.lastModified( ) ); zos.putNextEntry( ze );