Python Development Environment (Python IDE plugin for Eclipse). Features editor, code completion, re

源代码在线查看: package.java

软件大小: 5863 K
上传用户: alsczhang
关键词: Python Development Environment completion
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*
				 * Created on Jan 21, 2006
				 */
				package org.python.pydev.ui.dialogs;
				
				import org.eclipse.core.resources.IFolder;
				
				public class Package{
				    public IFolder folder;
				    public SourceFolder sourceFolder;
				    
				    public Package(IFolder folder, SourceFolder sourceFolder){
				        this.folder = folder;
				        this.sourceFolder = sourceFolder;
				    }
				
				    public String getPackageName() {
				        String srcPath = sourceFolder.folder.getFullPath().toString();
				        String complete = folder.getFullPath().toString();
				        if(complete.startsWith(srcPath)){
				            complete = complete.substring(srcPath.length()).replace('/', '.');
				            if(complete.startsWith(".")){
				                complete = complete.substring(1);
				            }
				        }
				        return complete;
				    }
				    
				}
							

相关资源