~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/DefaultCygwinToolFactory.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*******************************************************************************
2
 
 * Copyright (c) 2004, 2006 QNX Software Systems and others.
3
 
 * All rights reserved. This program and the accompanying materials
4
 
 * are made available under the terms of the Eclipse Public License v1.0
5
 
 * which accompanies this distribution, and is available at
6
 
 * http://www.eclipse.org/legal/epl-v10.html
7
 
 *
8
 
 * Contributors:
9
 
 *     QNX Software Systems - initial API and implementation
10
 
 *******************************************************************************/
11
 
package org.eclipse.cdt.utils;
12
 
 
13
 
import java.io.IOException;
14
 
 
15
 
import org.eclipse.cdt.core.ICExtension;
16
 
import org.eclipse.cdt.core.ICExtensionReference;
17
 
import org.eclipse.core.runtime.IPath;
18
 
import org.eclipse.core.runtime.Path;
19
 
 
20
 
 
21
 
public class DefaultCygwinToolFactory extends DefaultGnuToolFactory implements ICygwinToolsFactroy {
22
 
 
23
 
        
24
 
        /**
25
 
         * 
26
 
         */
27
 
        public DefaultCygwinToolFactory(ICExtension ext) {
28
 
                super(ext);
29
 
        }
30
 
        /*
31
 
         * (non-Javadoc)
32
 
         * 
33
 
         * @see org.eclipse.cdt.utils.CygwinToolsProvider#getCygPath()
34
 
         */
35
 
        public CygPath getCygPath() {
36
 
                IPath cygPathPath = getCygPathPath();
37
 
                CygPath cygpath = null;
38
 
                if (cygPathPath != null && !cygPathPath.isEmpty()) {
39
 
                        try {
40
 
                                cygpath = new CygPath(cygPathPath.toOSString());
41
 
                        } catch (IOException e1) {
42
 
                        }
43
 
                }
44
 
                return cygpath;
45
 
        }
46
 
 
47
 
        protected IPath getCygPathPath() {
48
 
                ICExtensionReference ref =  fExtension.getExtensionReference();
49
 
                String value = ref.getExtensionData("cygpath"); //$NON-NLS-1$
50
 
                if (value == null || value.length() == 0) {
51
 
                        value = "cygpath"; //$NON-NLS-1$
52
 
                }
53
 
                return new Path(value);
54
 
        }
55
 
 
56
 
}