Bug 534579

Summary: Improve documentation for default in Run/Debug configuration dialog
Product: [Eclipse Project] PDE Reporter: Vikas Chandra <Vikas.Chandra>
Component: DocAssignee: Vikas Chandra <Vikas.Chandra>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, sarika.sinha
Version: 4.8Keywords: Documentation
Target Milestone: 4.8 RC4   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/123963
https://git.eclipse.org/c/platform/eclipse.platform.common.git/commit/?id=e7838301ca6d756272f243fc7dbb962b3ab2e69b
Whiteboard:

Description Vikas Chandra CLA 2018-05-11 09:05:55 EDT
Current documentation : https://bugs.eclipse.org/bugs/attachment.cgi?id=273999

See Bug 534491 

The documentation should contain

- explain how the default executable is computed 
- what is default executable if default executable is not overridden
- remove windows specific text, put generic text ( that is valid for all platforms)
Comment 1 Vikas Chandra CLA 2018-05-23 13:29:16 EDT
Deciding on the documentation text requires more discussion. Moving to 4.8RC3

Action item after further discussion today
-------------------------------------------
It was good if PDE also shows default({0}) as the text ( that would show as default ( javaw)  if default is not overridden ) just like java application ( jre tab - clicking on alternate JRE).
Comment 2 Vikas Chandra CLA 2018-05-25 10:15:50 EDT
Opened Bug 535122 based on multiple discussions. This bug will just track the documentation.
Comment 3 Sarika Sinha CLA 2018-06-01 00:20:43 EDT
jdt.debug.ui defines -
<extension
         point="org.eclipse.jdt.debug.ui.vmInstallTypePage">
      <vmInstallTypePage
            vmInstallTypeID="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"
            class="org.eclipse.jdt.internal.debug.ui.jres.StandardVMCommandTab"
            id="org.eclipse.jdt.debug.ui.StandardVMCommandTab">
      </vmInstallTypePage>
 
   </extension>

org.eclipse.jdt.internal.debug.ui.jres.StandardVMCommandTab.getDefaultCommand() defines the default command which is used to append to "Default" in the Java executable section of JRE tab.

Currently Alternate command in Java executable section is defaulted to same as getDefaultCommand() if not provided already but if it is same as getDefaultCommand() eventually while saving, then it is saved as Default radio button selection.
Comment 4 Dani Megert CLA 2018-06-01 11:45:41 EDT
(In reply to Sarika Sinha from comment #3)
> jdt.debug.ui defines -
> <extension
>          point="org.eclipse.jdt.debug.ui.vmInstallTypePage">
>       <vmInstallTypePage
>            
> vmInstallTypeID="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"
>            
> class="org.eclipse.jdt.internal.debug.ui.jres.StandardVMCommandTab"
>             id="org.eclipse.jdt.debug.ui.StandardVMCommandTab">
>       </vmInstallTypePage>
>  
>    </extension>
> 
> org.eclipse.jdt.internal.debug.ui.jres.StandardVMCommandTab.getDefaultCommand()
> defines the default command which is used to append to "Default" in the Java
> executable section of JRE tab.
> 
> Currently Alternate command in Java executable section is defaulted to same
> as getDefaultCommand() if not provided already but if it is same as
> getDefaultCommand() eventually while saving, then it is saved as Default
> radio button selection.

So, how does this related to the PDE Main tab? Not clear to me after your comment.
Comment 5 Dani Megert CLA 2018-06-01 12:21:28 EDT
(In reply to Dani Megert from comment #4)
> (In reply to Sarika Sinha from comment #3)
> > jdt.debug.ui defines -
> > <extension
> >          point="org.eclipse.jdt.debug.ui.vmInstallTypePage">
> >       <vmInstallTypePage
> >            
> > vmInstallTypeID="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"
> >            
> > class="org.eclipse.jdt.internal.debug.ui.jres.StandardVMCommandTab"
> >             id="org.eclipse.jdt.debug.ui.StandardVMCommandTab">
> >       </vmInstallTypePage>
> >  
> >    </extension>
> > 
> > org.eclipse.jdt.internal.debug.ui.jres.StandardVMCommandTab.getDefaultCommand()
> > defines the default command which is used to append to "Default" in the Java
> > executable section of JRE tab.
> > 
> > Currently Alternate command in Java executable section is defaulted to same
> > as getDefaultCommand() if not provided already but if it is same as
> > getDefaultCommand() eventually while saving, then it is saved as Default
> > radio button selection.
> 
> So, how does this related to the PDE Main tab? Not clear to me after your
> comment.

PDE does not seem to use org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"
Comment 6 Sarika Sinha CLA 2018-06-04 00:23:35 EDT
(In reply to Dani Megert from comment #5)
> 
> PDE does not seem to use
> org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"

Yes, as PDE does not use this type or the StandardVMCommandTab, it can use the same attribute to append to default.

String javaCommand = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, "javaw");
Comment 7 Dani Megert CLA 2018-06-04 09:08:52 EDT
(In reply to Sarika Sinha from comment #6)
> (In reply to Dani Megert from comment #5)
> > 
> > PDE does not seem to use
> > org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"
> 
> Yes, as PDE does not use this type or the StandardVMCommandTab, it can use
> the same attribute to append to default.
> 
> String javaCommand =
> config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND,
> "javaw");

Right and this is in org.eclipse.pde.internal.ui.launcher.JREBlock where we also have the button with the label
==> So, it is super easy to show the default value in the UI as suggested in 535122 1). We should make this simple change for RC4.

For the documentation we can just say that the default can vary but is shown im the UI.
Comment 8 Eclipse Genie CLA 2018-06-05 01:51:14 EDT
New Gerrit change created: https://git.eclipse.org/r/123963
Comment 11 Dani Megert CLA 2018-06-06 04:09:58 EDT
Verified in eclipse-SDK-I20180605-2000-win32-x86_64.