Project

General

Profile

Revision 5b6653af

ID5b6653af71b7c1d3ae3998057cf3fa7502a76a58
Parent 4abd9b52
Child 799a6449

Added by Patrick Plitzner almost 4 years ago

fix #6307 Show contextPath in error log

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java
14 14
import org.eclipse.jface.dialogs.MessageDialog;
15 15
import org.eclipse.swt.widgets.Display;
16 16

  
17
import eu.etaxonomy.cdm.common.CdmUtils;
18
import eu.etaxonomy.cdm.config.ICdmSource;
17 19
import eu.etaxonomy.cdm.test.integration.SecurityExceptionUtils;
20
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
18 21
import eu.etaxonomy.taxeditor.store.CdmStore;
19 22
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
20 23

  
......
175 178
    public static List<String> getContextInfo() {
176 179
        List<String> contextInfo = new ArrayList<String>();
177 180
        String name = "";
181
        String contextPath = "";
178 182
        String schemaVersion = "";
179 183
        String server = "";
180 184
        String version = "";
......
182 186
        try {
183 187
            version = Platform.getBundle("eu.etaxonomy.taxeditor.application").getHeaders().get(org.osgi.framework.Constants.BUNDLE_VERSION);
184 188

  
185
            if(CdmStore.getActiveCdmSource() != null ) {
189
            ICdmSource activeCdmSource = CdmStore.getActiveCdmSource();
190
            if(activeCdmSource != null ) {
186 191
                login = CdmStore.getLoginManager().getAuthenticatedUser().getUsername();
187
                name = CdmStore.getActiveCdmSource().getName();
188
                schemaVersion = CdmStore.getActiveCdmSource().getDbSchemaVersion();
189
                server = CdmStore.getActiveCdmSource().getServer();
192
                name = activeCdmSource.getName();
193
                schemaVersion = activeCdmSource.getDbSchemaVersion();
194
                server = activeCdmSource.getServer();
195
                if(activeCdmSource instanceof CdmRemoteSource){
196
                    contextPath = ((CdmRemoteSource) activeCdmSource).getContextPath();
197
                }
190 198
            }
191 199

  
192 200
        } catch (Exception e) {
......
194 202
        }
195 203
        contextInfo.add("login : " + login);
196 204
        contextInfo.add("editor version : " + version);
197
        contextInfo.add("server : " + server + " / " + name);
205
        contextInfo.add("server : " + server + " / " + name + (CdmUtils.isNotBlank(contextPath)?" / "+contextPath:""));
198 206
        contextInfo.add("schema version : " + schemaVersion);
199 207
        contextInfo.add("os : " + System.getProperty("os.name")+" "+System.getProperty("os.version")+" "+System.getProperty("os.arch"));
200 208
        contextInfo.add("java : "+System.getProperty("java.version"));

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)