'분류 전체보기'에 해당되는 글 71건
- 2010.12.20 Dieter Ram's Ten Principles of Good Deisgn
- 2010.12.08 SWT Template
- 2010.09.10 Perl을 이용한 파일내 문자열 치환
- 2010.09.08 sed를 이용한 파일내 문자열 치환
- 2010.08.19 30+ Creative and Inspiring Macro Photography Examples
- 2010.08.11 ProgressMonitor with UI
- 2010.06.16 Simple Nebula Grid Selected Cell String Copy
- 2010.03.26 Human Readable df Output For HP-UX
- 2010.02.05 Busy cursor in Eclipse
- 2009.12.22 Eclipse .metadata가 깨졌을 경우
다음 예제는 *.c 파일 속에 있는 $1 문자열을 $2 문자열로 바꾼다.
ls_lst=`ls *.c`
for ls_one in ${ls_lst}; do
echo '=[ '$ls_one' ]'
sed -e "s%$1%$2%" $ls_one > $ls_one.temp
sed -e "s%$1%$2%" $ls_one.temp > $ls_one
rm -f $ls_one.temp
done
echo ' E N D'
IRunnableWithProgress runnable = new IRunnableWithProgress()
{
public void run(IProgressMonitor progressMonitor)
{
...
progressMonitor.beginTask("Generating DDL(s)", count);
...
}
progressMonitor.done();
}
};
progressMonitor.run(false, true, runnable); <- fork should be false
* void org.eclipse.jface.dialogs.ProgressMonitorDialog.run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException
If fork is set to false, the runnable will run in the UI thread and it is the runnable's responsibility to call Display.readAndDispatch() to ensure UI responsiveness.
#!/bin/sh
#=====================================================
#
# newdf - An improved human readable display of the HP-UX
# display filesystems command.
#
# Version 1.1
# Author: Scott Buffington
#
# Change History:
# Scott Buffington - 10/30/2006 - Created
# Scott Buffington - 03/18/2008 - Fixed Linewrap issue.
#
# License: GPL, http://www.gnu.org/copyleft/gpl.html
#
#=====================================================
awkscript="/tmp/newdf.$$"
trap "rm -f $awkscript" EXIT
cat << 'EOF' > $awkscript
function showunit(size)
{ mb = size / 1024; prettymb=(int(mb * 100)) / 100;
gb = mb / 1024; prettygb=(int(gb * 100)) / 100;
if ( substr(size,1,1) !~ "[0-9]" ||
substr(size,2,1) !~ "[0-9]" ) { return size }
else if ( mb < 1) { return size "K" }
else if ( gb < 1) { return prettymb "M" }
else { return prettygb "G" }
}
BEGIN {
printf "%-27s %8s %8s %8s %8s %-s\n",
"Filesystem", "Size", "Used", "Avail", "Capacity", "Mounted"
}
!/Filesystem/ {
size=showunit($2);
used=showunit($3);
avail=showunit($4);
printf "%-27s %8s %8s %8s %8s %-s\n",
$1, size, used, avail, $5, $6
}
EOF
df -Pk | grep -v "libc_psr.so.1" | sed -e :a -e '$!N;s/\n / /;ta' -e 'P;D' | awk -f $awkscript
public void run() {
// code to execute
}
};
org.eclipse.swt.custom.BusyIndicator.showWhile(null, runnable);
http://dev.eclipse.org/newslists/news.eclipse.tools/msg40810.html
http://blog.elitecoderz.net/category/development/java/eclipse-java-development/
The usefull information in this special case is: org.apache.commons.lang.exception.NestableError: Java Model Exception: Java Model Status [src/net/project/windows [in project] does not exist] for any reason, eclipse can not open a special file on the workbench. After several tries I found a way to solve this problem:
- Make a backup of your “.metadata“-folder (very important!!)
- navigate into the “.plugins“-folder located inside “.metadata“
- delete the folder “org.eclipse.ui.workbench“
- startup eclipse again and check if there is still everything you need