软件设计度量工具structure101学习(六):Project Properties
来源:互联网 发布:安装软件出现2503 编辑:程序博客网 时间:2024/05/17 04:00
现在我们看下如何新建一个structure101项目以及Project Properties的设置。项目设置包括如下内容:Project type、breakout、Excludes、Externals、Granularity、Source files和Transformations。配置好这些设置选项之后,我们可以另存为一个.hsp文件,这样下次使用的时候就可以直接打开hsp。
1.project type,指定需要用structure101分析的项目字节码位置。我们知道structure101的分析是基于字节码的,而不是源码。
2.breakout,有logical和physical两种。
举个例子:我们分析commons-collections.jar、commons-io.jar、commons-lang.jar这3个jar包之间的关系。下边作图是phsical视图,右图是logical视图。
3.Granularity
之前也介绍过,为了性能和显示效果考虑,structure101默认粒度是normal,不会显示某个类内部之间的依赖关系(比如:类的成员变量和成员函数间的依赖关系、内部类之间的依赖关系)。如果我们想要看到这些更细粒度的信息,可以将Granularity设置为Detail级别。
4.Externals
这个主要是为了忽略第三方类库,比如我们分析自己项目的依赖,肯定不关注自己类库与jre的依赖关系、与apache等第三方库的依赖关系。也就是说我们重点关注自己的代码,而不是第三方的代码。
5.Excludes
忽略某些类和包,不用进行依赖关系的分析。Occasionally, you may want to point at a jar file (or classes directory) but not include all the class files it contains. The most common scenario here is where you wish to exclude Test classes. You do this by specifying Exclude patterns. For example, *.Test* will exclude all classes whose local name begins with "Test"。
6.Source files
设置好项目字节码对应的源码位置之后,就可以使用structure101内置的源码阅读器或者外置阅读器了。这样点击某个方法或者类的时候,structure101会显示对应源码。
7.Transformations
还是先举个例子,比如我们上面分析了commons-collections.jar、commons-io.jar、commons-lang.jar这3个jar包。现在我想把这3个jar下面的所有异常拿出来,放在一个异常目录下。我们可以设置如下的Transformations。
我们看下显示效果图:
可以看到所有的异常都被拿出了,放在我们自己命名的exceptions下了。Transformations give you almost unlimited control over the structure of your model. You can specify a number of expressions that modify the fully-qualified names of the classes in your project - in effect moving them to locations other than their physical locations in the code-base.
设置好上面的这些配置,就能成功新建一个structure101项目了。structure101允许我们在创建之后修改这些参数。
- 软件设计度量工具structure101学习(六):Project Properties
- 软件设计度量工具structure101学习(三):Slices视图
- 软件设计度量工具structure101学习(五):repository的使用
- 软件设计度量工具structure101学习(一):structure101试用版licence的获取以及众多的structure101系列工具
- 软件设计度量工具structure101学习(二):Call Graph、Class Hierarchy、Collaboration、Composition视图
- 软件设计度量工具structure101学习(三.1):解决slices视图遗留问题
- 软件设计度量工具structure101学习(四):complexity的使用与计算
- 软件设计度量工具inFusion(二):看懂inFusion度量结果
- 软件设计度量工具inFusion(二):看懂inFusion度量结果
- 软件设计度量工具inFusion(一):inFusion的基本概念
- 软件设计度量工具inFusion(一):inFusion的基本概念
- 软件设计工具----UML学习第零课
- 机器学习笔记(六)性能度量
- project.properties
- 软件设计工具
- 度量学习
- 度量学习
- 度量学习
- Mongodb相对于关系型数据库的优缺点
- leetcode 3Sum
- 对InterruptedException的正确处理
- java向上取整函数Math.ceil()
- 《ArcGIS Runtime SDK for Android开发笔记》——(9)、空间数据的容器-地图MapView
- 软件设计度量工具structure101学习(六):Project Properties
- UIPickerView基本用法
- QT实现Webdav的HTTPS通信
- Android-Android系统源码下载2
- String,StringBuffer与StringBuilder的区别
- HDU 5585(数论)
- Android Manifest标签之action, activity-alias, category和compatible-screens
- DedeCMS 去掉文章及分类.html后缀的方法
- Android Studio 简单设置