[Title] common-eplugin: fixed wrong path problem of security profiles in preference 64/11364/1
authorJihoon Song <jihoon80.song@samsung.com>
Fri, 25 Oct 2013 03:06:50 +0000 (12:06 +0900)
committerJihoon Song <jihoon80.song@samsung.com>
Fri, 25 Oct 2013 03:06:50 +0000 (12:06 +0900)
[Desc.]
[Issue]

Change-Id: I5ebc8fc20ab8b4db422914537f9eb2605eb0360a

org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningPreferencePage.java
org.tizen.common.sign/src/org/tizen/common/sign/ui/ProfileItemDialog.java

index 8c7e5b6..633baf3 100755 (executable)
@@ -446,6 +446,8 @@ public class SigningPreferencePage extends PreferencePage implements IWorkbenchP
                     container.setActiveProfile( selectedProfile );
                     
                     listViewer.refresh( true );
+                    
+                    validatePreferencePage();
                 }
             }
             
@@ -865,18 +867,25 @@ public class SigningPreferencePage extends PreferencePage implements IWorkbenchP
 
     protected void validatePreferencePage() {
         setValid(true);
+        setMessage( null );
         setErrorMessage(null);
         
-        for ( SigningProfile profile : container.getProfiles() ) {
-            for ( SigningProfileItem item : profile.getProfileItems() ) {
+        SigningProfile activeProfile = container.getActiveProfile();
+        if ( activeProfile == null ) {
+            setMessage( "Set an active profile", WARNING );
+        } else {
+            for ( SigningProfileItem item : activeProfile.getProfileItems() ) {
+                
                 if ( item == null ) {
                     continue;
                 }
                 
-                checkFile( item.getKeyLocation(), KeyExtension.p12.name() );
-                
-                checkFile( item.getCAPath(), "cer" );
-                checkFile( item.getRootCAPath(), "cer" );
+                String keyLocation = item.getKeyLocation();
+                checkFile( keyLocation, KeyExtension.p12.name() );
+                if ( ! StringUtil.isEmpty( keyLocation ) ) {
+                    checkFile( item.getCAPath(), "cer" );
+                    checkFile( item.getRootCAPath(), "cer" );
+                }
             }
         }
     }
index d57b457..ee9ee26 100644 (file)
@@ -111,7 +111,7 @@ public class ProfileItemDialog extends StatusDialog {
         
         createTextWithBrowse( composite, ItemDataKey.keyPath, filterExt_p12, true );
         createPasswordText( composite, ItemDataKey.password );
-        createTextWithBrowse( composite, ItemDataKey.caPath, filterExt_cer, this.bEnableCA );
+        createTextWithBrowse( composite, ItemDataKey.caPath, filterExt_cer, true );
         createTextWithBrowse( composite, ItemDataKey.rootCaPath, filterExt_cer, this.bEnableCA );
         
         return composite;